Salve mi sono accorto che quando vado ad inserire delle parole con gli apici mi da errore(esempio l'input o citta') questo è il codi dell'inserti ...mi date una mano:
<html>
<head>
<title>INSERIMENTO DATI</title>
<LINK rel="stylesheet" href="Ticket.css" type="text/css">
</head>
<body>
<%
'on error resume next
dim objconn
dim objrs
dim appo
Campi_OK=true
Msg=""
%>
<body topmargin="0" bgcolor="#0000ff" background="lgrey069.jpg">
<table width="100%" border="0">
</table>
<table width="25%" border="0" heigt="300" align="center" >
<tr align="center">
<%
If request.form("sistema") = "" then
campi_OK=false
Msg=Msg & ""
- <span style=font-family:arial;font-size:12px;>Sistema</span>
end if
If request.form("Presenza_Anagrafica_Cliente_Storica" ) = "" then
campi_OK=false
Msg=Msg & ""
- <span style=font-family:arial;font-size:12px;>Presenza Anagrafica Cliente Storica</font></span>
end if
If request.form("PeriodoRetentionLOGOnLlineMesi") = "" then
campi_OK=false
Msg=Msg & ""
- <span style=font-family:arial;font-size:12px;>Periodo Retention LOG OnLine Mesi</font></span>
end if
If request.form("PeriodoRetentionBackUPDeLOgMesi") = "" then
campi_OK=false
Msg=Msg & ""
- <span style=font-family:arial;font-size:12px;>Periodo Retention BackUP De LOg Mesi</span>
end if
If request.form("TracciamentoAccessoUtentiSistema") = "" then
campi_OK=false
Msg=Msg & ""
- <span style=font-family:arial;font-size:12px;>Tracciamento Accesso Utenti Sistema </span>
end if
If request.form("TracciamentoAccessoVisualizzazioneSt ampaAnagrafica") = "" then
campi_OK=false
Msg=Msg &""
- <span style=font-family:arial;font-size:12px;>Tracciamento Accesso Visualizzazione Stampa Anagrafica </span>
end if
If Campi_OK = false then
response.write "<span style=font-family:arial;font-size:18px;>I campi con l'asterisco sono obbligatori:</span>
"
response.write Msg
%>
</table>
<p align="center"><input type="image" src="precedente.gif" onclick="history.back()"></p>
<%
else
set objconn = Server.CreateObject("ADODB.Connection")
set objrs = Server.CreateObject("ADODB.Recordset")
objconn.Open("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = c:/mdb/Gestione_PI_Tickets.mdb")
SQL = "INSERT INTO T_anagrafica"
SQL = SQL & " ("
SQL = SQL & "sistema,"
SQL = SQL & "note_anag,"
SQL = SQL & "SM_riferimento_nuovo,"
SQL = SQL & "Presenza_Anagrafica_Cliente_Storica,"
SQL = SQL & "PeriodoRetentionLOGOnLlineMesi,"
SQL = SQL & "PeriodoRetentionBackUPDeLOgMesi,"
SQL = SQL & "TracciamentoAccessoUtentiSistema,"
SQL = SQL & "TracciamentoAccessoVisualizzazioneStampaAnagrafic a,"
SQL = SQL & "Referenti,"
SQL = SQL & "Descrizione,"
SQL = SQL & "Interfaccia_utenti,"
SQL = SQL & "Tipologia_cliente"
SQL = SQL & ") "
SQL = SQL & "VALUES "
SQL = SQL & " ("
SQL = SQL & "'" & Request.form("sistema") & "',"
SQL = SQL & "'" & Request.form("note_anag") & "',"
SQL = SQL & "'" & Request.form("SM_riferimento_nuovo") & "',"
SQL = SQL & "'" & Request.form("Presenza_Anagrafica_Cliente_Storica" ) & "',"
SQL = SQL & "'" & Request.form("PeriodoRetentionLOGOnLlineMesi") & "',"
SQL = SQL & "'" & Request.form("PeriodoRetentionBackUPDeLOgMesi") & "',"
SQL = SQL & "'" & Request.form("TracciamentoAccessoVisualizzazioneSt ampaAnagrafica") & "',"
SQL = SQL & "'" & Request.form("TracciamentoAccessoUtentiSistema") & "',"
SQL = SQL & "'" & Request.form("Referenti") & "',"
SQL = SQL & "'" & Request.form("Descrizione")& "',"
SQL = SQL & "'" & Request.form("Interfaccia_utenti") & "',"
SQL = SQL & "'" & Request.form("Tipologia_cliente") & "'"
SQL = SQL & ") "
'response.write(SQL)
objrs.Open SQL, objconn,1,3
%>
<body topmargin="0" bgcolor="#0000ff" background="lgrey069.jpg">
<table width="30%" border="0" align="right">
<tr
<td align=right>
<td>[b]<%Response.write("<p align='center'>L'Utente collegato è:" & Session("User") & "</p>")%>
</tr>
</table>
<BODY leftmargin="0" bottommargin="10" rightmargin="0">
<form method="POST" action="inserisci_anagrafica.asp">
</table>
<table width="100%" border="0">
<tr align="left">
<td>[img]clip_image002.gif[/img]</td>
</tr>
</table>
<table width="12%" border="0">
<tr align="left">
<th>MD/BS-AO</th>
</tr>
</table>
<table width="99%" border="0" bgcolor="red">
<tr align="center">
<th></th>
</tr>
</table>
</tr>
</td>
</table>
</table>
<table width="25%" border="0" heigt="300" align="center" >
<tr>
<td align=center>
<%
Response.Write("Torna alla maschera d'inserimento")
%>
</tr>
</td>
</table>
</table>
<table width="25%" border="0" heigt="300" align="center" >
<tr>
<td align=center>
TORNA AL MENU
</tr>
</td>
</table>
<table width="25%" border="0" heigt="300" align="center" >
<tr>
<td align=center>
<%
objconn.close
Set objrs =Nothing
Set objconn =Nothing
end if
%>
</tr>
</td>
<table width="25%" border="0" heigt="300" align="center" >
</table>
</body>
</html>
grazue

Rispondi quotando
