I am building an application that needs to access a database. I installed SQLite.net, made references to SQLite for Windows Runtime and Microsoft Visual C++ Runtime Packages.

Now, how do I connect to the database? In other words, what are the Visual Basic codes? Note that I do not see a DataSet or DataGridView in the tools menu like there is in Visual Basic 2008 that I am more familiar with

I am using Visual Studio Express 2012 for Windows 8 (not the desktop version) and I code in Visual Basic.

4 Years
Discussion Span
Last Post by ADPYvette

You will need to find out what library you wish to use.

For example:

System.Data.* 'Microsoft loves re-inventing the wheel

As for the connection, you need to find the correct connection string to the database. (See here.)

Next you will have to determine which method of manipulation is right for you. (Sounds like one of THOSE commercials.)

You can pull down a copy of the data (Using DataAdapters) or manipulate the data "live" (Using DataReaders)

As for the code to connect, it is as simple as:

Dim con As OleDBConnection("MyConnectionStringHere")

Edited by Begginnerdev


My knowledge in databases is to limited to decipher your answer. Could you give the complete code.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.