INTEGER with DEFAULT NULL throws exception
Posted: Sun 17 Feb 2013 18:45
Hi,
is there a way to "learn" SQLiteCommand to understand a field definition like the following
I use INTEGER with DEFAULT NULL, but the following code throws an exception in cmd.ExecuteReader().
The c# code works fine if i use the INTEGER without DEFAULT NULL
Why?
is there a way to "learn" SQLiteCommand to understand a field definition like the following
Code: Select all
CREATE TABLE test (value INTEGER DEFAULT NULL);
Code: Select all
SQLiteConnection database = new SQLiteConnection(@"DataSource=test.sqlite");
database.Open();
SQLiteCommand cmd = new SQLiteCommand(@"SELECT * from test", database);
DataTable table = new DataTable();
table.Load(cmd.ExecuteReader());
Code: Select all
CREATE TABLE test (value INTEGER);