Question

I am a newbie in regards to System.Data.SQLite and .NET, so bear with me. I can't seem to get System.Data.SQLite even installed correctly. The self-installer completed and everything seemed to be kosher, but nothing seems to be working. In VC# Express, I tried to create a little sample program(http://pastebin.com/m8f7cec), but it's saying that it can't find System.Data.SQLite at the line: using System.Data.SQLite;. Also the Database explorer always errors out when I try to make a new connection, starting with, "Could not load file or assembly Microsoft.VisualStudio.Data"... I also don't know what to put in the Connection string. Can someone help just get this started? I am familiar with SQLite itself.
Thanks,
deftonix

Was it helpful?

Solution

All the installer does is put the proper libraries on your local machine, as well as enable the plug-ins within Visual Studio to allow you to explore your databases via Server Explorer.

You still need to Right Click on your "References" section in your project and add a reference to the library in order for it to work at runtime.

OTHER TIPS

You need to add a reference within your project to the System.Data.SQLite dll.

For the connection string, try http://www.connectionstrings.com, it has the format for most common connections.

This is now available through NuGet (the question was asked 8 years ago when I'm guessing it was not in NuGet).

Add it with NuGet and that will download the DLL(s) and add it as a reference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top