On 6 Jan 2015, at 7:49pm, Nelson, Erik - 2 <erik.l.nel...@bankofamerica.com> 
wrote:

> Is there any way to force the bind_text() to store the input text verbatim?

<https://www.sqlite.org/datatype3.html>

"A column with TEXT affinity stores all data using storage classes NULL, TEXT 
or BLOB. If numerical data is inserted into a column with TEXT affinity it is 
converted into text form before being stored. [...]

When text data is inserted into a NUMERIC column, the storage class of the text 
is converted to INTEGER or REAL (in order of preference) if such conversion is 
lossless and reversible."

If your affinity really is TEXT and you really are binding a string, then 
SQLite should be binding the string, not some number.  The thing that would 
explain what you're reporting is if the column's affinity is REAL or INTEGER.

Can you open the database with a shell tool to make sure ?

Another possibility is that everything is being stored fine, and that something 
is changing the type of the result just before you print it.  To check this do 
something like

SELECT id,length(id) FROM tester

and see whether the length is what you'd expect it to be.

Simon.

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

Reply via email to