Return to Snippet

Revision: 35753
at November 12, 2010 21:22 by delineo


Initial Code
Using myConnection As New SqlConnection
myConnection.ConnectionString = ConfigurationManager.ConnectionStrings("strConn").ConnectionString

Dim myCommand As New SqlCommand
myCommand.Connection = myConnection
myCommand.CommandText = "spSelect"
myCommand.CommandType = CommandType.StoredProcedure
myCommand.Parameters.AddWithValue("@User", ViewState("User").toString())

myConnection.Open()
Using dtrReader As SqlDataReader = myCommand.ExecuteReader()
While dtrReader.Read()

strLink = dtrReader("Title")

End While
End Using
myConnection.Close()

End Using

Initial URL

                                

Initial Description

                                

Initial Title
DataReader code block

Initial Tags
database

Initial Language
VB.NET