MySQL Using UPDATE for saving a picture

baleareninsel at gmx.net baleareninsel at gmx.net
Wed Dec 13 06:52:25 EST 2006


Hi everybody,

Trying to save a picture (.jpg or .bmp) to mySQL Database.

I Use 
  put the imagedata of image "Foto_Image" into temp3 ## works
  put "UPDATE Customers SET Fomage = '"& temp3 & "' where kndnr =" & kundennummer into SQL_Befehl
to_i
In the Variable Watcher I can see the SQL_Befehl as:

UPDATE knddaten SET Foto_image = ' --- here are crazy signs -- ' where kndnr = 3120 ## which looks ok

The Error Message shown by the Message box is:
You have an error in your SQL Syntax; check the manual that corresponds to your mySQL server version for the right syntax to use near ' ## the crazy signs, but not so much as there are in the picture

The problem seems to be, that the image itself will not be transfered.

The type of  Table Customers and Field Foto_image is set to BLOB

Again, I need a helpfull hand

best regards and thank you

Horst




More information about the use-livecode mailing list