Am 15.07.2013 22:26, schrieb Simon Slavin:

On 15 Jul 2013, at 9:18pm, Bernd <be...@web.de> wrote:

I know that SQLite is inherently type-less, but I'm using System.Data.SQLite 
which tries it very best to force that into the common ADO.NET schema.
I'm having troubles with some text that has leading zeros, like '01', '02' and 
so on. I'm reading that text out of an Oracle-DB into a SQLite table which has 
the affected column defined as 'String' - which maps to TEXT in native SQLite - 
via a parameterized insert query and a parameter DbType of 'String' as well. 
Nonetheless the leading zero gets stripped off the text. Any ideas how I could 
preserve those leading zeros?

The following two statements do different things.

INSERT INTO myTable VALUES (01)
INSERT INTO myTable VALUES ('01')

Can you tell what's being done in your setup ?  Is there a way using your API 
that you can stress that the value you're binding or inserting is text, not a 
number ?

Simon.

As I use a parameterized query, I'm pretty certain that it should be '01' - the second case. Stepping through the code in VS Debugger also shows that DbType of that parameter is String and Value is '01'.

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

Reply via email to