cosa sarebbe questo errore??
Exception Details: System.Data.OleDb.OleDbException: No value given for one or more required parameters.
Source Error:
Line 29: Dim objReader As oleDbDataReader
Line 30: Con.Open()
Line 31: objReader = myCommand.ExecuteReader()
Line 32: If Not objReader.Read() Then
Line 33: Response.Redirect("http://www.noidellac.it/compiti/default.aspx?error=1")
il codice della funzione è questo:
codice:Sub Login(sender As Object, e As System.EventArgs) Dim Con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " _ + "Data Source=c:\\hosting\\noidellac.it\\wwwroot\\mdb-database\\regarray.mdb") Dim sqlString = "SELECT * FROM utenti WHERE password ='" & txtPass.Text & "', username='" & txtId.Text & "'" Dim myCommand As New OleDbCommand(sqlString, Con) Dim objReader As oleDbDataReader Con.Open() objReader = myCommand.ExecuteReader() If Not objReader.Read() Then Response.Redirect("http://www.noidellac.it/compiti/default.aspx?error=1") Else Session.Item("login") = 1 Session.Item("userID") = txtId.Text Response.Redirect("http://www.noidellac.it/compiti/index2.aspx") End If objReader.Close() Con.Close() End Sub![]()

Rispondi quotando

