I have been suggested to write the following code in order to be able to execute a sqlcommand query:
http://forums.asp.net/t/1900876.aspx/1?How+to+use+the+SQLcommand+to+perform+loading+from+the+main+table+to+the+temporary+table+
Dim conString = ConfigurationManager.ConnectionStrings("TrackingConnectionString") Dim strConnString As String = conString.ConnectionString Dim queryString As String = "SELECT * FROM Postings" Using connection As New SqlConnection(conString) Dim command As New SqlCommand(queryString, connection) connection.Open() Dim reader As SqlDataReader = command.ExecuteReader() ...

Go to the complete details ...