我正在尝试使用 ProviderFactory.CreateConnection() 来获取 SQLite 连接。我收到带有以下消息的 System.ArgumentException:
“不支持关键字:'datetimeformat'。”
连接字符串是:
@"data source=d:\db\Test.db3;Pooling=True;Max Pool Size=10;datetimeformat=Ticks"
在 app.config 文件中,我有:
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite"/>
<add name="SQLite Data Provider" invariant="System.Data.SQLite"
support="3F" description=".Net Framework Data Provider for SQLite"
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
</DbProviderFactories>
</system.data>
当我实例化 SQLiteConnection 实例时,连接字符串起作用。使用 ProviderFactory 失败。关于如何解决这个问题的任何建议?