>> My question came purely from a mild curiosity.  I was wondering about 
>> the behavior of sqlite call sqlite3_bind_text when it is passed a range 
>> of BYTES that includes nulls.

See this snipper for documentation:

"The third argument is the value to bind to the parameter.

In those routines that have a fourth argument, its value is the number of
bytes in the parameter. To be clear: the value is the number of bytes in the
value, not the number of characters. If the fourth parameter is negative,
the length of the string is the number of bytes up to the first zero
terminator.

The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and
sqlite3_bind_text16() is a destructor used to dispose of the BLOB or string
after SQLite has finished with it. If the fifth argument is the special
value SQLITE_STATIC, then SQLite assumes that the information is in static,
unmanaged space and does not need to be freed. If the fifth argument has the
value SQLITE_TRANSIENT, then SQLite makes its own private copy of the data
immediately, before the sqlite3_bind_*() routine returns."

http://sqlite.org/c3ref/bind_blob.html

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Eric Smith
Sent: sexta-feira, 9 de julho de 2010 14:54
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Null character problem

Simo Slavin wrote: 

> (according to your earlier post) 

I'm not OP.  I'm Eric.  OP was someone else.  In this context, I don't 
care about blobs or about the right way of doing anything.

> Read the documentation for memset().  

I know quite well how memset works.  I know character!=byte.  These 
matters are irrelevant to my question.  

My question came purely from a mild curiosity.  I was wondering about 
the behavior of sqlite call sqlite3_bind_text when it is passed a range 
of BYTES that includes nulls.

-- 
Eric A. Smith

It's up.  It sorta works.  That's a start.
    -- BJ Premore
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to