[Gambas-user] PRB: MySQL and BLOBS

Fabian Schmieder df76 at ...17...
Fri Apr 9 19:34:40 CEST 2004


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





More information about the User mailing list