akeniade / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

SQLiteDatabase.cs class #181

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
There is a problem in this case

private int ReadNextRow(Vdbe vm, DataTable table)

crashes on default case with a System.ArgumentException

Can't use

 table.Columns[i].DataType = null;
 columnValues[i] = "";

I replaced it with

 table.Columns[i].DataType = typeof(System.Nullable);
 columnValues[i] = null;

and problem is now fixed

Original issue reported on code.google.com by pkedp...@gmail.com on 16 Dec 2013 at 4:32

GoogleCodeExporter commented 8 years ago
Here is the file 

https://code.google.com/p/csharp-sqlite/source/browse/Community.CsharpSqlite.Ben
chmark/Classes/SQLiteDatabase.cs

Original comment by pkedp...@gmail.com on 16 Dec 2013 at 5:14

GoogleCodeExporter commented 8 years ago
Also could you fix that when it encounters a SQLITE_INTEGER that it figures out 
what kind it is byte/int/long because they all seem to be long right now even 
though I mostly use int's although Convert.ToInt32(...); works I was thinking 
of just using like (int)DataRow["field"]; and that doesn't work since they are 
all long to begin with.

But ya doubt up 2 you good luck

Original comment by pkedp...@gmail.com on 16 Dec 2013 at 5:16