Reputation: 2049
I'm trying to work with a SQLite database in C#, using the ADO.NET 2 Provider from this sourceforge as suggested in this tutorial.
I think I messed up the installation. It doesn't find a class and I tried several wrappers from different sources, so I would like to reinstall, but I can't seem to remove or repair it.
When I try to uninstall, first it asks me for the System.Data.SQLite.DLL
, which I don't think I have, then it prompts me an error "There is a problem with this Windows Installer package, a program required for this install to complete could not be run. Contact your support personnel or package vendor."
Trying to repair gives me the error "A network error occured while attempting to read from the file C:\Users\Username\AppData\Local\Temp\tmpD938.tmp.msi"
Can someone who uses this ADO.NET 2 Provider please tell me where the program normally installs to, and perhaps upload the System.Data.SQLite.DLL
so I can try to uninstall with that? I'm on Windows 7.
Thanks (and sorry for this beginneresque question but I just wasted countless hours on trying to uninstall this properly by myself.)
Upvotes: 0
Views: 539
Reputation: 1039478
I would recommend you using the NuGet package. In the Package Manager Console type:
Install-Package System.Data.SQLite
This will add reference to the System.Data.SQLite
assembly and add the x86 and x64 unmanaged libraries to your project.
Now you could directly start working with it:
using (var conn = new SQLiteConnection("Data Source=mydb.db;"))
using (var cmd = conn.CreateCommand())
{
conn.Open();
cmd.CommandText = "...";
...
}
Upvotes: 1