E' un DB Access....
Il codice è questo:
Codice PHP:
using System.Data.OleDb;
.....
protected void btnRegistra_Click(object sender, EventArgs e)
{
OleDbConnection connUtente = new OleDbConnection(
"provider=Microsoft.Jet.OLEDB.4.0;Database='Esame';Integrated Security=sspi");
connUtente.Open();
string strStatement =
"INSERT INTO Utenti(Username, Password, Email, Telefono) VALUES('" +
txtUser.Text + "', '" +
txtPass.Text + "', '" +
txtEmail.Text + "', '" +
txtTelefono.Text + "');";
OleDbCommand cmdPerson = new OleDbCommand(strStatement, connUtente);
cmdPerson.ExecuteNonQuery();
connUtente.Close();
txtUser.Text = "";
txtPass.Text = "";
txtConfermaPass.Text = "";
txtEmail.Text = "";
txtConfermaEmail.Text = "";
txtTelefono.Text = "";
txtUser.Focus();
}
L'errore è questo:
Errore server nell'applicazione '/Esame'.
Si sono verificati errori in un'operazione OLE DB composta da più passaggi. Controllare i singoli valori di stato OLE DB, se disponibili. Nessuna operazione eseguita.
Descrizione: Eccezione non gestita durante l'esecuzione della richiesta Web corrente. Per ulteriori informazioni sull'errore e sul suo punto di origine nel codice, vedere l'analisi dello stack.
Dettagli eccezione: System.Data.OleDb.OleDbException: Si sono verificati errori in un'operazione OLE DB composta da più passaggi. Controllare i singoli valori di stato OLE DB, se disponibili. Nessuna operazione eseguita.
Errore nel codice sorgente:
Riga 22: OleDbConnection connUtente = new OleDbConnection(
Riga 23: "provider=Microsoft.Jet.OLEDB.4.0;Database='Esame' ;Integrated Security=sspi");
Riga 24: connUtente.Open();
Riga 25:
Riga 26: string strStatement =
Con la riga 24 evidenzata....
cosa sbaglio?