[Gambas-user] PRB: MySQL and BLOBS

Benoit Minisini gambas at ...1...
Fri Aug 20 11:34:18 CEST 2004


On Friday 09 April 2004 19:34, Fabian Schmieder wrote:
> Hi folks,
>
> I've got a problem with Blobs and MySQL on Gambas:
>
> I would like to store a HTML page of about 5kb in a MEDIUMTEXT field (a
> BLOB). When I try to insert the data using the Exec command like this
>
> db.Exec( "insert into dokument ( text ) values ('" & Parser.Body & "')")
>
> and the result of Parser.Body is bigger than 213 bytes Gambas is popping
> up an error window showing me the MySQL Error "Query failed: You have an
> error in your SQL Syntax ..."
>
> I've escaped the contents of Parser.Body as descibed in
> http://www.mysql.com/doc/en/String_syntax.html !
>
> I don't think that this is a MySQL or just a syntax error, because when
> I copy the result of PRINT "insert into dokument ( text ) values ( '" &
> Parser.Body & "' )" and paste it into my SQL gui and send the query
> manually, everything is working perfectly. Even with 5kb of text...
>
> Is anybody out there who can help?
>
> Thanks a lot,
> Fabian
>

I know, it is old :-), but did anybody get the same problem ? I couldn't 
succeed in reproducing it.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list