On 1 Dec 2005, at 15:10, [EMAIL PROTECTED] wrote:
So in the example of $sth->execute($blob), if $blob contains an
integer, use sqlite3_bind_int64(), or if $blob contains a string
use sqlite3_bind_text(), or if $blob contains a blob, then use
sqlite3_bind_blob(), and so forth.
Is there something about perl internals that prevents the above
from working?
Yes. Perl has no concept of blobs. A scalar variable can be one of:
IV (integer)
UV (unsigned integer)
NV (double)
PV (string)
so a blob is just a string - but perl carries a length around with it
so you can have binary data in there.
You'd have to check something like strlen(data) != len to determine if
it contained NULs (or just scan for the NUL - same difference).
Matt.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________