E' la prima volta che uso mysql con asp, devo inserire dei valori nel db, ho provato a fare in questo modo:
MA mi da errore:codice:Set SQLstmt= Server.CreateObject("ADODB.Recordset") SQL= "SELECT gruppo, responsabile, telefono, Nome, Cognome, il, nato_a, tessera, Via, numero, CAP, citta, Provincia, Telefono1, email, domenica, sabato, med, alimen, Documento FROM iscrizione" SQLstmt.Open SQL,objConn,2,3 SQLstmt.AddNew SQLstmt("gruppo") = gruppo SQLstmt("responsabile") = responsabile SQLstmt("telefono") = telefono SQLstmt("Nome") = Nome SQLstmt("Cognome") = Cognome SQLstmt("il") = il SQLstmt("nato_a") = nato_a SQLstmt("tessera") = tessera SQLstmt("Via") = Via SQLstmt("numero") = numero SQLstmt("CAP") = CAP SQLstmt("citta") = citta SQLstmt("Provincia") = Provincia SQLstmt("Telefono1") = Telefono1 SQLstmt("email") = email SQLstmt("domenica") = domenica SQLstmt("sabato") = sabato SQLstmt("med") = med SQLstmt("alimen") = alimen SQLstmt("Documento") = Documento SQLstmt.Update SQLstmt.Close Set SQLstmt = Nothing objConn.Close Set objConn = Nothing
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/add1.asp, line 85
la linea 85 è quella in rosso
Dovevo scrivere qualcosa del tipo:
[CODE]
INSERT INTO `iscrizione` ( `gruppo` , `responsabile` , `telefono` , `Nome` , `Cognome` , `il` , `nato_a` , `tessera` , `Via` , `numero` , `citta` , `CAP` , `Provincia` , `Telefono1` , `email` , `domenica` , `sabato` , `med` , `alimen` , `Documento` )
VALUES (
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''
);

Rispondi quotando