I'm trying/want to store the results of a sql query in session variables, how do I do this?
My code so far works and returns results to a gridview..
If True Then
'Establishing the MySQL Connection
Dim strConnString As String = ConfigurationManager.ConnectionStrings("ZUConnectionString").ConnectionString
Dim sqlConnection1 As New SqlConnection(strConnString)
Dim query As String
Dim SqlCommand As SqlCommand
Dim reader As SqlDataReader
Dim adapter As New SqlDataAdapter()
'Open the connection to db
'Generating the query to fetch the contact details
query = "SELECT * FROM All"
SqlCommand = New SqlCommand(query, sqlConnection1)
adapter.SelectCommand = New SqlCommand(query, sqlConnection1)
'execute the query
reader = SqlCommand.ExecuteReader()
'Assign the results
GridView1.DataSource = reader
'Bind the data
I'd like to store each returned field as