I don't the language your using but it looks like you may have left out a
comma.
I find it difficult to know what is going on with your code without knowing
the content of your variables. Could you provide us with the contents of
strbuf, before it is passed to mysql!?
----- Original Message -----
From: "jarle rudihagen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 27, 2001 6:50
Subject: problems with insert
> I got a mysql table with to collumns: imageID(integer) and
imageData(blob).
>
> I'm using the mysql++ API.
>
> I can't seem to insert both the imageID and imageData into the table. When
> I'm just inserting the imageData(the blob field) it works out fine. But as
> soon as I try to pass both fields, things crash.
>
> My coding:
> string fill(read_buffer,blen);
> strbuf << "INSERT INTO " << MY_TABLE << "values(" << argv[2] << "\"" <<
> escape << fill << "\")";
> query.exec(strbuf.str());
>
> The following message apear:
> [jarle@biri2 jarle]$ ./test_mysql_image "essolog.gif"
> "/home/jarle/essolog.gif" "2"
> Error: You have an error in your SQL syntax near
> '/home/jarle/essolog.gif"GIF89a\\\0>\0Õ\0\0ó÷úÞYoþèì$a¢åíô7oª®ÅÜCw®ZÏ
>
> can anybody help me???
>
> /Jarle
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php