Salve,
Ho un problrmino con una query
il codice è questo:
<%@ LANGUAGE=VBScript %>
<% option explicit %>
<%
const ForAppending = 8
'-------------------------------------
dim strCognome, strNome, strluognasc , strprovnasc
strCognome = Request.Form("Cognome")
strNome = Request.Form("Nome")
strluognasc = Request.Form("luognasc")
strprovnasc = Request.Form("provnasc")
'-------------------------------------
dim strdatanasc , strcomres , strprovres , strindres , strcap , strtelcasa
dim strcell, straltrrecap, strgiorilav, stradulrilav
strdatanasc = Request.Form("datanasc")
strcomres = Request.Form("comres")
strprovres =Request.Form("provres")
strindres = Request.Form("indres")
strcap = Request.Form("cap")
strtelcasa = Request.Form("telcasa")
strcell = Request.Form("cell")
straltrrecap = Request.Form("altrrecap")
strgiorilav = Request.Form("giorilav")
stradulrilav = Request.Form("adulrilav")
' -------------------------------------
dim strtitstud , strconpressist , strdi , strcondpen , strdiritciv , strfigprof, strditta
strtitstud = Request("titstud")
strconpressist = Request("conpressist")
strdi = Request("di")
strcondpen = Request.Form("condpen")
strdiritciv = Request.Form("diritciv")
strfigprof = Request.Form("figprof")
strditta = Request("ditta")
' -------------------------------------
If strCognome = "" Or strNome = "" Or strluognasc = "" Or strprovnasc= "" Or strdatanasc = "" Or strcomres = "" Or strprovres = "" Or strindres = "" Or strtitstud= "" Or strcondpen= "" Or strdiritciv= "" Or strfigprof= "" Or strditta= "" Then
Response.Write "DATI INCOMPLETI. RICONTROLLARE I DATI INSERITI."
Else
Dim Stringa_Connessione,Query
Stringa_Connessione="Provider=Microsoft.Jet.OLEDB. 4.0;Data Source=C:/inetpub/wwwroot/progettolabor/Labor.mdb;Persist Security Info=False;"
DIM Rec
Set Rec =server.CreateObject("adoDB.Connection")
Rec.ConnectionString = Stringa_Connessione
Rec.Open
Query="Insert Into generale (Cognome , Nome , luognasc , provnasc , datanasc ,"
Query=Query & "comres , provres , indres , cap , telcasa ,"
Query=Query & "cell , altrrecap, giorilav , adulrilav , titstud , conpressist , di , "
Query=Query & "condpen , diritciv , figprof , ditta) Values (" & "'" & Replace(strCognome,"'","''") & "','" & Replace(strNome,"'","''") & "',"
Query=Query & "'" & Replace(strluognasc,"'","''") & "','" & Replace(strprovnasc,"'","''") & "','" & Replace(strdatanasc,"'","''") & "',"
Query=Query & "'" & Replace(strcomres,"'","''") & "','" & Replace(strprovres,"'","''") & "','" & Replace(strindres,"'","''") & "','" & Replace(strcap,"'","''") & "','" & Replace(strtelcasa,"'","''") & "',"
Query=Query & "'" & Replace(strcell,"'","''") & "','" & Replace(straltrrecap,"'","''") & "','" & Replace(strgiorilav,"'","''") & "','" & Replace(stradulrilav,"'","''") & "','" & Replace(strtitstud,"'","''") & "','" & Replace(strconpressist,"'","''")
Query=Query & "','" & Replace(strdi,"'","''") & "',"
Query=Query & "'" & Replace(strcondpen,"'","''") & "','" & Replace(strdiritciv,"'","''") & "','" & Replace(strfigprof,"'","''") & "','" & Replace(strditta,"'","''") & "')"
Query=Replace(Query,"'ON'",1)
'response.write Query & "
"
Dim RS
Set RS = Server.Createobject("adoDB.Recordset")
RS=Rec.Execute(Query)
End If
C'è chi mi può aiutare a da tre giorni che sbatto la testa al muro ho evidenziato le stinghe che ho aggiunto
grazie