hi,
im trying to wite some info to MS Access database with a DSNLess connection, i just cant seem to get past ther error!
heres the error:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/registerinterest.asp, line 40
SQL ="INSERT INTO reginterest(fname,sname,hfno,add1,add2,pcode,daytel,evetel,mobtel,email,btoc,detreq)VALUES('"&fname&"','"&sname&"','"&**hfno&"','"&add1&"','"&add2&"','"&pcode&"','"&daytel&"','"&evetel&"','"&mobtel&"','"&email&"','"&btoc&"','"&detreq&"')"
*error points to **
im confused my connection stuff is as follows :
any help will be much appreciated Hemal
im trying to wite some info to MS Access database with a DSNLess connection, i just cant seem to get past ther error!
heres the error:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/registerinterest.asp, line 40
SQL ="INSERT INTO reginterest(fname,sname,hfno,add1,add2,pcode,daytel,evetel,mobtel,email,btoc,detreq)VALUES('"&fname&"','"&sname&"','"&**hfno&"','"&add1&"','"&add2&"','"&pcode&"','"&daytel&"','"&evetel&"','"&mobtel&"','"&email&"','"&btoc&"','"&detreq&"')"
*error points to **
im confused my connection stuff is as follows :
Code:
<%
Set Con=Server.CreateObject("ADODB.Connection")
Con.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("databases/pj.mdb")&";"
'Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("databases/pj.mdb")&";"
SQL ="INSERT INTO reginterest(fname,sname,hfno,add1,add2,pcode,daytel,evetel,mobtel,email,btoc,detreq)VALUES('"&fname&"','"&sname&"','"&hfno&"','"&add1&"','"&add2&"','"&pcode&"','"&daytel&"','"&evetel&"','"&mobtel&"','"&email&"','"&btoc&"','"&detreq&"')"
Set ipRS=Server.CreateObject("ADODB.Recordset")
ipRS.open , SQL , Con
%>