G
Gérard Leclercq
ACCESS
First fields are TEXT, last 2 are Numbers
The name of the fields are correct.
Dim MyConn
Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath
("/xdata/sc.mdb")
Sql = "INSERT INTO sc (" & _
"session,sessionLanguage,sessionProductReferentie," & _
"sessionProductGroep,sessionProductSubGroep," & _
"sessionProductTaal1,sessionProductTaal2,sessionProductTaal3," & _
"sessionProductAantal,sessionProductWKP)" & _
" VALUES (" & _
Chr(34) & Application("id") & Chr(34) & "," & _
Chr(34) & Request.form("taal") & Chr(34) & "," & _
Chr(34) & Request.form("referentie") & Chr(34) & "," & _
Chr(34) & Request.form("groep") & Chr(34) & "," & _
Chr(34) & Request.form("subgroep") & Chr(34) & "," & _
Chr(34) & Replace(Request.form("taal1"),Chr(34)," ") & Chr(34) & "," & _
Chr(34) & Replace(Request.form("taal2"),Chr(34)," ") & Chr(34) & "," & _
Chr(34) & Replace(Request.form("taal3"),Chr(34)," ") & Chr(34) & "," & _
Request.form("aantal") & "," & _
Replace(Request.form("wkp"),",",".") & ")"
MyConn.Execute sql
Set MyConn=Nothing
If i print the SQL string it looks like:
INSERT INTO sc
(session,sessionLanguage,sessionProductReferentie,sessionProductGroep,sessionProductSubGroep,sessionProductTaal1,sessionProductTaal2,sessionProductTaal3,sessionProductAantal,sessionProductWKP)
VALUES
("81.165.236.141-1/02/2005-20:00:34-804105034","N","22102","22","10HA","GEKLOVEN
RIET","ROSEAU PAR 1/2 KG","",1,9.8)
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
Can somebody point me what i'm doing wrong?
Thx, Gérard.
First fields are TEXT, last 2 are Numbers
The name of the fields are correct.
Dim MyConn
Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath
("/xdata/sc.mdb")
Sql = "INSERT INTO sc (" & _
"session,sessionLanguage,sessionProductReferentie," & _
"sessionProductGroep,sessionProductSubGroep," & _
"sessionProductTaal1,sessionProductTaal2,sessionProductTaal3," & _
"sessionProductAantal,sessionProductWKP)" & _
" VALUES (" & _
Chr(34) & Application("id") & Chr(34) & "," & _
Chr(34) & Request.form("taal") & Chr(34) & "," & _
Chr(34) & Request.form("referentie") & Chr(34) & "," & _
Chr(34) & Request.form("groep") & Chr(34) & "," & _
Chr(34) & Request.form("subgroep") & Chr(34) & "," & _
Chr(34) & Replace(Request.form("taal1"),Chr(34)," ") & Chr(34) & "," & _
Chr(34) & Replace(Request.form("taal2"),Chr(34)," ") & Chr(34) & "," & _
Chr(34) & Replace(Request.form("taal3"),Chr(34)," ") & Chr(34) & "," & _
Request.form("aantal") & "," & _
Replace(Request.form("wkp"),",",".") & ")"
MyConn.Execute sql
Set MyConn=Nothing
If i print the SQL string it looks like:
INSERT INTO sc
(session,sessionLanguage,sessionProductReferentie,sessionProductGroep,sessionProductSubGroep,sessionProductTaal1,sessionProductTaal2,sessionProductTaal3,sessionProductAantal,sessionProductWKP)
VALUES
("81.165.236.141-1/02/2005-20:00:34-804105034","N","22102","22","10HA","GEKLOVEN
RIET","ROSEAU PAR 1/2 KG","",1,9.8)
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
Can somebody point me what i'm doing wrong?
Thx, Gérard.