Try: SQLEXEC(1, "INSERT INTO t (rec_id, PhotoField) VALUES (1, ?lcPhoto)")

It Works!
Thank you very much Ted!

I have spent more than 3 hours trying cast , createbinary and every other function that I could imagine.
It was soo simple. <grrrrr>

Many Thanks
Vassilis Aggelakos


----- Original Message ----- From: "Ted Roche" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, August 23, 2006 4:22 PM
Subject: Re: MySQL newbie strikes again!


On 8/23/06, Vassilis Aggelakos <[EMAIL PROTECTED]> wrote:

As I wait Whil's new book about MySQL Server I tried to create a test
database and I crashed on the wall many times


Good! That's what test databases are for. Patience!

1. I create a table t with a MEDIUMBLOB field named PhotoField for storing
some photographs.
    Typing in the command window:
    lcPhoto = Filetostr("c:\myphoto.jpg")
? SQLEXEC(1, "insert into t (rec_id, PhotoField) values (1, " + lcPhoto +
")" )
   I get an error saying that my syntax is not correct.


Try: SQLEXEC(1, "INSERT INTO t (rec_id, PhotoField) VALUES (1, ?lcPhoto)")

--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to