Ciao a tutti,
ho il seguente codice per inserire 4 campi in una tabella:
----------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
if(Request.Querystring("cognome") <> "") then Command1__var1 = Request.Querystring("cognome")
if(Request.Querystring("nome") <> "") then Command1__var2 = Request.Querystring("nome")
if(Request.Querystring("pws") <> "") then Command1__var4 = Request.Querystring("pws")
if(Request.Querystring("user") <> "") then Command1__mm = Request.Querystring("user")
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_conn_strl_STRING
Command1.CommandText = "INSERT INTO amministratori (cognome, nome, pws, user) VALUES ('" + Replace(Command1__var1, "'", "''") + "', '" + Replace(Command1__var2, "'", "''") + "', '" + Replace(Command1__var4, "'", "''") + "', '" + Replace(Command1__mm, "'", "''") + "') "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<html>
<head>
<title>Documento senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="refresh" content="0;URL=pannello_controllo.asp">
</head>
<body>
</body>
</html>
-------------------------------------
Che mi genera questo errore:
-------------------------------------
Please try the following:
Fare clic sul pulsante Aggiorna o riprovare più tardi.
Aprire la localhost home page e cercare i collegamenti alle informazioni desiderate.
HTTP 500.100 - Errore interno del server - errore ASP
Internet Information Services
--------------------------------------------------------------------------------
Informazioni tecniche (per il personale del supporto tecnico)
Tipo di errore:
Microsoft JET Database Engine (0x80040E14)
Errore di sintassi nell'istruzione INSERT INTO.
/successo-travel/amministrazione/insert_amministratori.asp, line 22
Tipo di browser:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Pagina:
GET /successo-travel/amministrazione/insert_amministratori.asp
Ora:
lunedì 7 giugno 2004, 20.03.43
Informazioni aggiuntive:
Supporto Microsoft
---------------------------------
Sapreste dirmi perchè? Ho ricontrollato più volte ma non mi sebra di aver commesso errori.....
Grazie![]()