Ragazzi io proprio nn capisco dove sbaglio: il mio obiettivo e', mediante un form, aggiungere dei dati in un database creato in precedenza in una piccola pagina scritta in asp e testata in locale. Chi mi aiuta?
codice:<%@LANGUAGE = VBScript%> <% Dim sc, cn, rs sc = "driver={Microsoft Access Driver (*.mdb)};dbq=" Set cn = Server.CreateObject("ADODB.Connection") cn.Open sc & Server.MapPath("libreria.mdb") Set rs = Server.CreateObject("ADODB.Recordset") %> <html> <head> <title>Aggiungi un autore</title> </head> <body> <h1>Aggiungi un autore</h1> <form method="POST" action="add.asp"> autore<input type="text" name="autore" size="30"> titolo<input type="text" name="titolo" size="30"> casa_ed<input type="text" name="casa_ed" size="30"> anno_pub<input type="text" name="anno_pub" size="30"> <input type="submit" value="invia" name="ora"> </form> <% dim a,b,c,d a = Request.Form("autore") b = Request.Form("titolo") c = Request.Form("casa_ed") d = Request.Form("anno_pub") rs.Open "catalogo", cn, 3, 3 rs.AddNew rs("autore")= a rs("titolo")= b rs("casa_ed")= c rs("anno_pub")= d rs.update rs.Close OBJdbConnection.Close %> </body> </html> <% Set rs = Nothing cn.Close Set cn = Nothing %>

Rispondi quotando
