Posted on: 11/19/2012 12:11:12 AM | Views : 446

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 ...