Created
June 16, 2010 15:33
-
-
Save reu/440860 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim Connection As New SqlConnection() | |
Dim Command As New SqlCommand() | |
Dim Result As SqlDataReader | |
Connection.ConnectionString = "Data Source=myserver;Initial Catalog=databasename;Integrated Security=True" | |
Connection.Open | |
Command.Connection = Connection | |
Command.CommandText = "SELECT * FROM users" | |
Result = Command.ExecuteReader | |
While Result.NextResult() | |
Result.Read() | |
MsgBox(Result("Column Name")) | |
End While | |
Result.Close | |
Connection.Close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment