Jag får det här meddelandet trots att jag vet att det finns data i tabellen. Kan det bero på något annat fel jag gör? Så här ser proceduren ut:No data exists for the row/column
Sub RedirectPage()
Dim sName As string
Dim sPassw As string
Dim sPage As String
Dim cn As OleDbConnection
cn = new OleDbConnection(ConfigurationSettings.Appsettings("DbConn"))
Dim dr as OleDbDataReader
Dim cmd As new OleDbCommand("SELECT page FROM login " & "WHERE name='" & sName & "' AND passw='" & sPassw & "'", cn)
cn.Open()
dr = Cmd.ExecuteReader(CommandBehavior.CloseConnection)
Response.Redirect(dr("Page"))
End Sub