Question [SQLite] Which package to install?

littlebigman

Well-known member
Joined
Jan 5, 2010
Messages
75
Programming Experience
Beginner
Hello

I'd like to install the SQLite Ado .Net package, but am confused between...

  • Setups
  • Precompiled binaries
  • Precompiled static

... and whether to use the bundle/no bundle option.

The FAQ recommends always using the Precompiled binaries for both development and user hosts.

I understand that the Precompiled static are meant for users who don't have admin rights to install the required VC++ runtime, but I wonder what the Setups packages are for, and whether to use the bundle or no-bundle options.

Thank you.
 
After installing "Visual Studio Express 2012 for Windows Desktop", I downloaded and ran "Setups for 32-bit Windows (.Net Framework 4.5) bundle 1.0.84.0".

I left the default option checked "Generate native images for the assemblies and install the images in the native image cache", and didn't check the other option ("Install the assemblied into the global assembly cache" + "Install the designer components for Visual Studio 2012") since the design-time component is no longer supported for Express editions.

Next, I created a new Windows Forms project, and tried adding a reference to SQLite, but it wasn't listed in Assemblies > Framework/Extension. So I tried running SQLite's installer.exe: "Cannot continue, the "confirm" option is not enabled"

So, I used Project > Add Reference, hit "Browse", and pointed to "System.Data.SQLite.DLL". Seemed OK.

Next, I ran the the following code, which worked OK:
=============
Dim SQLconnect As New SQLite.SQLiteConnection()

SQLconnect.ConnectionString = "Data Source=c:\users\joe\test.sqlite;"
SQLconnect.Open()
SQLconnect.Close()
=============

Finally, I tried this code:
=============
Dim SQLconnect As New SQLite.SQLiteConnection()
Dim SQLcommand As SQLiteCommand

SQLconnect.ConnectionString = "Data Source=c:\users\fred\test.sqlite;"
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandText = "INSERT INTO Item (type) VALUES ('something')"
SQLcommand.ExecuteNonQuery()
SQLcommand.Dispose()
SQLconnect.Close()
=============

but it fails on the second line with "Type SQLiteCommand is not defined". Is there another component I need to install?

Thank you.
 
Got it: It just needs the following line at the top of the file:

VB.NET:
Imports System.Data.SQLite

But I'm still curious about why there are so many options.
 
Their wiki says that the "bundle" version contains System.Data.SQLite.dll, a single, mixed-mode assembly (SQLite + .Net wrapper), and should only be used "to support legacy applications by having it installed in the Global Assembly Cache (GAC)."

I don't understand what it means. Does someone know?

Does it mean that, when running the app the first time, the .Net framework will copy the DLL into the GAC, which could/will break applications that rely on the original System.Data.SQLite.dll from Phoenix Software Solutions?

Thank you.
 
Back
Top