I just want to make sure that this is the right code for working with SQLite for fastest performance..
someone suggested me I should Use paramertized queries and to wrap connection and command also in Using block.. but how do I do that?
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim cons As New SQLite.SQLiteConnection
Dim cmd As New SQLite.SQLiteCommand
cons.ConnectionString = "Data Source=C:\data.s3db; Version=3"
cmd = cons.CreateCommand()
Using tx = cons.BeginTransaction()
For i As Integer = 0 To 1000
cmd.CommandText = "INSERT INTO table1 VALUES('" & i & "')"