|
1 members (Russ),
10,950
guests, and
1,516
robots. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
S |
M |
T |
W |
T |
F |
S |
|
|
|
1
|
2
|
3
|
4
|
5
|
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
|
27
|
28
|
29
|
30
|
31
|
|
|
|
|
This is another custom island. This one could be used for ads. This spot is one of the best places for ads on your site to be placed. This can be enabled/disabled on a per forum basis.
|
|
|
|
Joined: Dec 1999
Posts: 30,868
Master Elite Member
|
Here is some sample code to help people get SQLite up and running with VB.NET. I am using the SQLite.NET provider found here: http://sqlite.phxsoftware.com/This was tested on VB 2005.
Private Sub SQLiteTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SQLiteTest.Click
Dim i As Int32 'General counter
Dim Row As DataRow
'Open a connection
Dim Con As New SQLite.SQLiteConnection
Con.ConnectionString = "Data Source=C:\temp\test.db3;"
Con.Open()
'Fill a DataSet object
Dim Adapter As New SQLite.SQLiteDataAdapter("SELECT * FROM Customers", Con)
Dim ds As New DataSet
Adapter.FillSchema(ds, SchemaType.Mapped, "Customers")
Adapter.Fill(ds, "Customers")
'Display some data
Debug.Print("Total Rows: " & ds.Tables("Customers").Rows.Count)
i = 1 'Tracks the current record number
For Each Row In ds.Tables("Customers").Rows
Debug.Print(i & " Name: " & Row("Name") & " City: " & Row("City") & " State: " & Row("State"))
i += 1
Next
'Close the connection
Con.Close()
End Sub
|
|
|
|
Entire Thread
|
Getting SQLite Working with VB.NET
|
Russ
|
09/19/08 07:47 AM
|
|
|
|