In classic ASP I user to loop through a recordset assinging data to variables -how can I do this in ASP.NET when opening the connection? (i.e. without having to bind data to controls)?<BR><BR>Code:<BR><BR>Dim dbConn As SqlConnection <BR>dbConn = New SqlConnection(ConfigurationSettings.AppSettings("MyConn")) <BR><BR>Dim dbCmd As SqlCommand <BR>dbCmd = New SqlCommand("SELECT * FROM tblAdmin WHERE userName='name'", dbConn) dbConn.Open() <BR> <BR>userDetails.DataSource = dbCmd.ExecuteReader()<BR>userDetails.DataBind()fill a DataReader and loop through that like so...<BR>Dim drDetails As SqlDataReader = dbCmd.ExecuteReader()<BR><BR>While drDetails.Read()<BR> Dim var1 As String = drDetails("ColumnName")<BR>End While<BR>drDetails.Close()Thanks -this is exaclty what I was looking for. Another basic question:<BR><BR>I'm doing your code in the Page_Load sub -how do I make a var globally visible? i.e. so that it can be used between <% %> tags in the HTML further down.<BR><BR>Thanks