I am getting a syntax error on this SQL statement (I wasn't sure whether to post here or the SQL forum) which I have being executed in an ASP page. Can someone take a look and let me know if they see anything standing out? I am running it on IIS (XP OS) and it gives me a syntax error. I have pasted the code below:
~Erin
Code:
<html>
<head>
<title></title>
</head>
<%
customer=Request.QueryString("customer")
Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/logins.mdb")
%>
<body>
<span class="style4">* Please use the Customer ID obtained from the FileMaker Database, as you will need this ID to grant them access to the web site!!!</span>
<form action="addcust.asp" method="post" name="Form">
Customer ID: <input name="custid" type="text" id="custid" size="6" maxlength="6">
<br>
Customer Name: <input name="custname" type="text" id="custname" size="25" maxlength="25">
<br>
Cust Username: <input name="custuser" type="text" id="custuser" size="25" maxlength="25">
<br>
Cust Password: <input name="custpass" type="text" id="custpass" size="10" maxlength="10">
<br>
Customer Email: <input name="custemail" type="text" id="custemail" size="35" maxlength="35"><br>
<input name="submit" type="submit" value="Submit">
<input name="clear" type="reset" value="Clear">
</form>
<%
frmcustid=Request.Form("custid")
frmcustname=Request.Form("custname")
frmcustuser=Request.Form("custuser")
frmcustpass=Request.Form("custpass")
frmcustemail=Request.Form("custemail")
Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/logins.mdb")
SQL = "INSERT INTO cust_logins(CustID,CUSTUSER,CUSTPASS,CustName,email) VALUES ("& frmcustid &","& frmcustuser &","& frmcustpass &","& frmcustname &","& frmcustemail &")"
Set rec=Con.execute(sql)
%>
</body>
</html>
~Erin