Thanks for the reference. Sorry for the delay in responding but I had been
away. Yes the mystring$ is built with single strops to quote the content. I
have an issue running this command so I have worked around it by putting the
content of the var mystring$ into a text file and then putting it into the
BLOB field using LOAD_FROM_FILE.
Slower I know but I get no errors.
Kerry
-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: 03 February 2006 11:28
To: mysql@lists.mysql.com
Subject: Re: update a Blob field using UPDATE
Hello.
Have you applied mysql_real_escape_string to your BLOB variable first?
See:
http://dev.mysql.com/doc/refman/5.0/en/mysql-real-escape-string.html
I do not see the quotes around mystring$ as well.
Kerry Frater wrote:
I am importing data from a non MySQL table into MySQL.
In the table there is a text field of up to length 4000 chars. I have
defined the column as blob in the MySQL table.
I can read the text field of the source table into a variable e.g.
mystring$. The MySQL table has been set, except for this data.
I thought to use
SQLString = UPDATE TheTable SET Notes = + mystring$ + WHERE
TheTableRef = ' + Myref$ + ';
I get error:
You have an error in the SQL syntax
I have tried to search the manual for an example of updating a blob column
from a variable and cannot find one. I don't want to save the content of
the
var to disk and then load from file because of the time it takes.
Do I have another option?
Kerry
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
__ ___ ___ __
/ |/ /_ __/ __/ __ \/ /Gleb Paharenko
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET
___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]