This should get you started:
Dim thread as New Thread(new ThreadStart(ThreadProc))
thread.Start()
Private Sub TreadProc()
Dim conn As SqlConnection = Nothing
Dim cmd as SqlCommand = Nothing
Try
conn = new SqlConnection(blah blah)
conn.Open()
cmd = new SqlCommand("query text", conn)
cmd.ExecuteNonQuery()
Catch ex as Exception
Finally
If conn IsNot Nothing Then
conn.Close()
End If
End Try
End Sub