On Dec 11, 2007, at 2:10 PM, [EMAIL PROTECTED] wrote:

You should normally not be inserting megabyte-sized blobs and
strings using raw SQL.  Instead, use bound parameters:

    sqlite3_prepare("INSERT INTO tablexyz VALUES(:blobcontent)");
    sqlite3_bind_blob(pStmt, 1, pBlobContent, SQLITE_STATIC);
    sqlite3_step(pStmt);

Indeed. That's what I did to work around the problem - wrote a tool that essentially did a dump/load using bound parameters.

Yes, this does create problems for .dump/.load in the shell.
But, as has been pointed out, you can work around it using
a compile-time switch:

gcc -DSQLITE_MAX_SQL_LENGTH=1000000000 shell.c sqlite3.c -o sqlite3

I should probably modify the makefile to do this automatically...

That would be great. That would increase the likelihood that the sqlite3 shell that shipped in binary form in OS distributions had a functional .dump/.load for large rows.

Thanks,
Jim


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to