Hi,
I use DbProviderFactory with System.Data.SQLite 1.0.60.0 in code like this:
DbProviderFactory dbProviderFactory = DbProviderFactories.GetFactory(ConfigurationContext.ProviderName);
DbConnection connection = dbProviderFactory.CreateConnection();
connection.ConnectionString = ConfigurationContext.ConnectionString;
connection.Open();
DbCommand command = dbProviderFactory.CreateCommand();
command.Connection = connection;
command.CommandText = "query with parameter";
command.Parameters.Add(someInteger); << here exception
System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.Data.SQLite.SQLiteParameter'.
It seems, that last line call Add(SQLiteParameter) instead of Add(Object).
Something wrong in my code?
Thanks