******************************
http://forum.aspitalia.com/forum/pos...-800a01c2.aspx
******************************
ciao,
utilizzo questo codice
per modificare un db. tutto funzionava fino a 2 campi "Titolo e Testo", adesso sto cercando di inserire un altro campo "localita" ma mi restituisce questo errore.codice:<% QSID = Request.QueryString("id") If QSID = "" OR NOT IsNumeric(QSID) OR QSID = Null Then QSID = 0 Else QSID = cLng(Request.QueryString("id")) End If If Request.QueryString("a") = "conferma" Then FTitolo = Request.Form("Titolo") FLocalita = Request.Form("localita") FTesto = Request.Form("Testo") If QSID <= 0 Then Errore = Errore & "Il campo ID è obbligatorio (errore parametri)" End If If FTitolo = "" Then Errore = Errore & "Il campo Titolo è obbligatorio" End If If FTesto = "" Then Errore = Errore & "Il campo Testo è obbligatorio" End If SQL = " SELECT Titolo FROM Tabella WHERE Tabella.ID = "& QSID &" " Set RS = Server.CreateObject("ADODB.Recordset") RS.Open SQL, Conn, 1, 3 If NOT RS.EOF Then FTitoloVecchio = RS("Titolo") End If Set RS = Nothing If Errore = "" AND FTitoloVecchio <> "" Then Set FSO = CreateObject("Scripting.FileSystemObject") < RIGA 36 > If FSO.FileExists(Server.MapPath("/rewr/vns/") & "\" & ConvertiTitoloInNomeScript(FTitoloVecchio, QSID)) Then Set Documento = FSO.GetFile(Server.MapPath("/rewr/vns/") & "\" & ConvertiTitoloInNomeScript(FTitoloVecchio, QSID)) Documento.Delete Set Documento = Nothing End If SQL = " UPDATE Tabella SET Titolo = '"& Replace(FTitolo, "'", "''") &"', localita = '"& Replace(FLocalita, "'", "''") &"', Testo = '"& Replace(FTesto, "'", "''") &"' WHERE Tabella.ID = "& QSID &" " Set RS = Server.CreateObject("ADODB.Recordset") RS.Open SQL, Conn, 1, 3 Set RS = Nothing Set Documento = FSO.OpenTextFile(Server.MapPath("/rewr/vns/") & "\" & ConvertiTitoloInNomeScript(FTitolo, QSID), 2, True) ContenutoFile = "" ContenutoFile = ContenutoFile & "<" & "%" & vbCrLf ContenutoFile = ContenutoFile & "VarID = "& QSID &"" & vbCrLf ContenutoFile = ContenutoFile & "%" & ">" & vbCrLf ContenutoFile = ContenutoFile & "" Documento.Write ContenutoFile Set Documento = Nothing Set FSO = Nothing End If End If %> <html> <head> <title>Modifica</title> </head> <body> <% SQL = " SELECT Titolo, Testo, localita FROM Tabella WHERE Tabella.ID = "& QSID &" " Set RS = Server.CreateObject("ADODB.Recordset") RS.Open SQL, Conn, 1, 3 If NOT RS.EOF Then RS.MoveFirst %> <form action="modifica.asp?id=<%=QSID%>&a=conferma" method="post"> Titolo <input type="textbox" name="Titolo" value="<%=Server.HTMLEncode(RS("Titolo"))%>" size="53" maxlength="50" /> Testo Località <input type="textbox" name="localita" value="<%=Server.HTMLEncode(RS("localita"))%>" size="150" maxlength="150" /> <textarea name="Testo" rows="5" cols="40"><%=Server.HTMLEncode(RS("Testo"))%></textarea> <input type="submit" name="modifica" value="Modifica" /> </form> <% End If Set RS = Nothing %> </body> </html> <% Conn.Close Set Conn = Nothing %>
dove sbaglio?codice:Errore di run-time di Microsoft VBScript errore "800a01c2' Numero errato di argomenti o assegnazione di proprietà non valida: 'ConvertiTitoloInNomeScript' /rewr/vns/admin/modifica.asp, riga 36
grazie.

Rispondi quotando
