cosa ha questa pagina che non va?
a me non da nessun tipo di errore, xò non aggiunge neanche il record al databasecodice:<% dim feed feed=request.querystring("feed") if feed then dim tipo, lingua, prodotto, descrizione lingua=request.form("lingua") tipo=request.form("tipo") prodotto=request.form("prodotto") descrizione=request.form("descrizione") if len(descrizione)<256 then Set objConn = Server.CreateObject("ADODB.Connection") dbconnection="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("/mdb-database/news.mdb") objConn.Open dbconnection select case lingua case italiano Set objRs = Server.CreateObject("ADODB.Recordset") set objRs = objConn.Execute(SQL) SQL = "INSERT INTO elencoita (tipo, prodotto, descrizione)" SQL = SQL&"VALUES('"&tipo&"','"&prodotto&"','"&descrizione&"')" objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing case tedesco Set objRs = Server.CreateObject("ADODB.Recordset") set objRs = objConn.Execute(SQL) SQL = "INSERT INTO elencoted (tipo, prodotto, descrizione)" SQL = SQL&"VALUES('"&tipo&"','"&prodotto&"','"&descrizione&"')" objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing case inglese Set objRs = Server.CreateObject("ADODB.Recordset") set objRs = objConn.Execute(SQL) SQL = "INSERT INTO elencoeng (tipo, prodotto, descrizione)" SQL = SQL&"VALUES('"&tipo&"','"&prodotto&"','"&descrizione&"')" objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing end select response.write("prodotto aggiunto al database") else response.write("lunghezza del campo descrizione eccessiva") end if else %> <form method="POST" action="prodotti.asp?feed=TRUE"> <select size="1" name="lingua"> <option>italiano</option> <option>tedesco</option> <option>inglese</option> </select></p> <select size="1" name="tipo"> <option>rossi</option> <option>bianchi</option> <option>dessert</option> <option>spumanti</option> <option>altro</option> </select></p> <input type="text" name="prodotto" size="20"></p> <textarea rows="10" name="descrizione" cols="43"></textarea></p> </p> </p> </p> <input type="submit" value="Invia" ><input type="reset" value="Reimposta" ></p> </form> <%end if%>![]()
![]()
boooooh

Rispondi quotando