NetTalk Central

Author Topic: Base64 question  (Read 4136 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Base64 question
« on: March 08, 2019, 12:01:01 AM »
Hi.

This is not a NetTalk question, but rather a general question which I experience in my NetTalk web service.

We have an MS SQL table where the owner decided to have a "Photo" column of type varbinary(max)  to store an image. The way that I've dealt with images before, is to rather have a varchar(max) column type and store the image as a Base64-encoded value.

For this varbinary(max) column, I use Stringtheory to decode the Base64 value received, but it still causes MS SQL to throw an error - I suppose because Clarion is trying to save a string instead of binary values. I have tried changing the type in the dictionary to both BLOB and PICTURE, both result in a Clarion runtime error.

Is there anyone that has dealt within this data type before?

Thys

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: Base64 question
« Reply #1 on: March 08, 2019, 01:07:33 AM »
This is the error returned:

[22005] Invalid character value for cast specification