Sono nuovo in ambito asp.net 3 eseguendo la queri qui sotto mi restituisce il messagge di errore
"Errore - No data exists for the row/column. "
Qualcuno puo darmi una mano ?
tnx
codice:Me.errore.Visible = False Dim Stringa_connessione As String = "Provider=SQLOLEDB.1;Password=user2009db;Persist Security Info=True;User ID=userdb;Initial Catalog=Repas;Data Source=172.20.1.47" Dim conn As New OleDb.OleDbConnection conn.ConnectionString = Stringa_connessione conn.Open() Try Dim Sql As String = "SELECT * FROM OPERATORI WHERE vch_user = '" & Me.vch_username.Text & "' AND vch_pass = '" & Me.vch_pass.Text & "'" Dim cmd = New OleDbCommand(Sql, conn) Dim rs As OleDbDataReader rs = cmd.ExecuteReader() If rs.HasRows Then If rs.Item("bool_amministratore") Then Response.Write("<script> " & vbCrLf & " document.location.href='webform2.aspx';" & vbCrLf & " </script>") Else Response.Write("<script> " & vbCrLf & " document.location.href='Default.aspx';" & vbCrLf & " </script>") End If Else Me.errore.Text = "Utente Non Riconosciuto" Me.errore.Style.Add("color", "red") Me.errore.Visible = True End If rs.Close() Catch ex As Exception Me.errore.Text = "Errore - " & ex.Message Me.errore.Style.Add("color", "red") Me.errore.Visible = True End Try conn.Close()

Rispondi quotando