DBConnection = New SqlConnection
With DBConnection
.ConnectionString = strConnString
.Open()
End With
DBcommand = New SqlCommand
With DBcommand
.Connection = DBConnection
.CommandText = strSQL
.CommandType = CommandType.Text
End With
Tag : .NET, Web (ASP.NET), VB.NET, VS 2008 (.NET 3.x)