ciao...
ho un problema a inserire dai valori attraverso un form in un db acces....c'è qualcuno che può aiutarmi???
questo è il codice del form:
<html>
<head>
<title>Documento senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form" method="post" action="insert.asp">
<table width="75%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>NOME</td>
<td><input name="nome" type="text" id="nome"></td>
</tr>
<tr>
<td>COGNOME</td>
<td><input name="cognome" type="text" id="cognome"></td>
</tr>
<tr>
<td>EMAIL</td>
<td><input name="mail" type="text" id="email"></td>
</tr>
<tr>
<td>TESTATA</td>
<td><textarea name="testata" id="testata"></textarea></td>
</tr>
<tr>
<td>REGISTRA</td>
<td><input type="submit" name="Submit" value="Invia"></td>
</tr>
</table>
</form>
</body>
</html>
e questa la pagina in asp:
<html>
<head>
<title>Documento senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
conn.open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("..database.mdb") & ";")
%>
<%
dim nome, cognome, mail, testata
nome = request.form("nome")
cognome = request.form("cognome")
mail = request.form("mail")
testata = request.form("testata")
MySql = "INSERT INTO inserimento(NOME,COGNOME,EMAIL,TESTATA) VALUES ( ' " & nome & " ', ' " & cognome & " ', ' " & email & " ', ' " & testata " ' )"
conn.Execute MySql
%>
</body>
</html>
mi dice che necessita di una query aggiornabile...alla riga dove c'è conn.Execute Mysql...
grazie mille

Rispondi quotando
