Well, it appears that this project is abandoned, so this is just for anyone who runs across this...
There are several problems with this as it stands... these are the ones I discovered before I gave up (I hit a dead end with the DataAdapter.Fill method).
1) The first problem is that all of the GetInsertCommand/GetDeleteCommand/GetUpdateCommand methods are broken. None of them properly assign a BaseTableName to the tableschema, and therefore you always get the error I mentioned above whenever using any of those methods. I solved this by parsing the table name out of the SQL statement from the sourceCommand, passing that table name to the SQLiteDataReader and then using the following line to assign the table name in GetSchemaTable:
schemaRow["BaseTableName"] = baseTable;
(baseTable is the variable I use to pass the table name)
You must replace the existing (similar) line with that one.
2) But that only gets you through the GetInsertComand method without errors... then you have another problem: The Parameter.Direction isn't being set to "Input". As a result, every record you Insert is empty. So, I had to go into all of the constructors for SqliteParameter and set the Direction to ParameterDirection.Input
3) But that only gets the data into the table in SOME format. It's still not very useful, because the GetSchemaTable method defaults all of the DataTypes (and ProviderTypes) of the columns to "String" (or "AnsiString"). So, I fixed this by adding these two lines to the GetSchemaTable method:
dataTableSchema.Columns.Add ("DataType", typeof(String));
schemaRow["DataType"] = this.GetDataTypeName(i);
You must replace the existing (similar) lines with those.
This stores the string value corresponding to each column's datatype in the schematable.
Then I went to both of the CreateParameter methods and added this line:
DbType dbType = GetDbTypeFromString((string)schemaRow["DataType"]);
You have to replace the existing (similar) line.
Then I created a function (GetDbTypeFromString) that checked the string in the DataType of the schema and returned the corresponding DbType (this was done with a big switch/case statement).
So at that point I had everything working right for the InsertCommand...
But then I ran into a new problem: Selecting data from the database returns EVERYTHING in String format. Doesn't matter what the type is for the column in the database, it's gonna return a string.
So, if you use...
(this is VB, btw)
da = New SqliteDataAdapter(sSQL, con)
dt = New DataTable
da.Fill(dt)
...then all of the columns in the DataTable (dt) that gets returned from the database are formatted as strings. So integers are converted to strings. Bit (Boolean) values are converted to "True" and "False" (the actual strings)... .and so on.
Now, if I use that exact same code to hit the same database using the System.Data.SQLite provider (which is very interchangeable with this project, btw, except for the connection string), then I get a datatable with all of the right DataTypes for each column.
And since SqliteDataAdapter.Fill is simply inherited from DbDataAdapter.Fill, I don't know what this project is doing differently from System.Data.SQLite. As a result, I'm at an impasse.
I really wanted to use this, because it's 100% C# and I've been looking for a good embedded database for almost 10 years now, and a pure C# port of SQLite really would have met almost all of my criteria, but as it stands, I can't really get useful out of the database.
If anyone runs across this and knows why the data is always being returned as Strings, I'd be interested to hear of a workaround.
WATYF