Do you know how to get past this error? The create table sql is full of foriegn key contraints (and are based on sql server sql), but my understanding is that these are parsed but ignored. The database tables create ok, but fail on GetSchema.
"Specified cast is not valid."
at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ)
at System.Data.SQLite.SQLiteDataReader.GetString(Int32 i)
at System.Data.SQLite.SQLiteConnection.Schema_ForeignKeys(String strCatalog, String strTable, String strKeyName)
at System.Data.SQLite.SQLiteConnection.GetSchema(String collectionName, String[ restrictionValues)
at System.Data.SQLite.SQLiteConnection.GetSchema(String collectionName)
at SqliteConsoleTest.Form1.ReadSchema() in ...\Form1.cs:line 43
Code:
public static void ReadSchema()
{
Console.WriteLine("ReadSchema");
SQLiteConnection conn = new SQLiteConnection("data source=item.db3");
conn.Open();
DataTable dt = conn.GetSchema("FOREIGNKEYS");
}