SQLiteConnection Constructor(String)
Initializes a new instance of the
SQLiteConnection class when given a string containing the connection string.
The following example creates and opens a
SQLiteConnection.
|
|---|
public void CreateSQLiteConnection()
{
string myConnString =
"DataSource=mydatabase.db;";
SQLiteConnection sqConnection = new SQLiteConnection(myConnString);
sqConnection.Open();
//Do something
sqConnection.Close();
} |
|
|---|
Public Sub CreateSQLiteConnection()
Dim myConnString As String = _
"DataSource=mydatabase.db;"
Dim sqConnection As New SQLiteConnection(myConnString)
sqConnection.Open()
'Do something
sqConnection.Close()
End Sub |