Dear Sir!

I would like to ask you to help me with an issue which appears while I use
System.Data.SQLite database engine.

I use .net framework 4.0.0, EntityFramework 6.2.0 and SQLite 1.0.106. I
have an entity with properties of string type. This entity is mapped
to my database table which has the same structure (columns names and data
types). When I write and read back data to and from the database, all is OK
while these columns have strings like "abcdef" or "123abc". But when I try
to write a string like "1234" it is written to the database table like an
int data type value. I know that it is a normal behavior and it is not an
issue (https://sqlite.org/faq.html#q3). But I get the
"System.InvalidCastException" when I try to read back the row from the
database to my entity because the datatypes are different (the entity has
the property of string type but the database table now has the cell of int
datatype).

Please, give me the clues what is going wrong, if you can. I think it is a
typical bug in many situations.

Thank you in advance!

Yours Faithfully,

Aleksey Lulchenko, .Net developer at "TDabbat".
 Saratov, Russia
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to