I created a new class call MainUtil which has some public Execute SQL function like following.
Public Class MainUtil
Public Function ExecuteScarSQLResult(ByRef SQLStatement As String) As Long
dim Myinteger as integer
Dim cmd As SqlCommand = New SqlCommand
Dim connStr As String = "Data Source=MyComputer\myServer;Initial Catalog=myDatabase;User ID=myID;Password=password"
Dim connection As New SqlConnection(connStr)
connection.Open()
With cmd
.CommandText() = SQLStatem ...
Go to the complete details ...