Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

process problem

Status
Not open for further replies.

havoc33

Technical User
Dec 3, 2003
16
NO
When I try to check out my order in the shopping cart, I get an error which I don't know what means:

Microsoft OLE DB Provider for SQL Server (0x80040E14)
Line 1: Incorrect syntax near '.06'.
/folder/process.asp, line 62

The code on that line is:

call openConn()
dbc.execute sqlAdd, intAffected

 
You have to check the value of sqlAdd
Feel free to post the code populating this variable.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi, thanks for helping. Here's the code:

sqlAdd = "INSERT INTO orders(ocustomerid,odate,orderamount,ocardtype,ocardno,"
sqlAdd = sqlAdd & "ocardname,ocardexpires,ocardaddress"
If Not Request.Form("shipaddress")="" then
sqlAdd = sqlAdd & ",oshipaddress,oshiptown,oshipzip,oshipstate,oshipcountry"
End If
sqlAdd = sqlAdd & ") VALUES("
sqlAdd = sqlAdd & Session("customerid") & ",'" & MyConvert(Date) & "'," & intTotal
sqlAdd = sqlAdd & ",'" & Request.Form("paymentm") & "','" & Request.Form("cardno") & "'"
sqlAdd = sqlAdd & ",'" & TwoSingleQ(Request.Form("cardname")) & "','" & expDate & "'"
sqlAdd = sqlAdd & ",'" & TwoSingleQ(Request.Form("cardaddress")) & " '"
If Not Request.Form("shipaddress")="" then
sqlAdd = sqlAdd & ",'" & TwoSingleQ(Request.Form("shipaddress")) & "'"
sqlAdd = sqlAdd & ",'" & TwoSingleQ(Request.Form("shiptown")) & " '"
sqlAdd = sqlAdd & ",'" & Request.Form("shipzip") & " '"
sqlAdd = sqlAdd & ",'" & Request.Form("shipstate") & " '"
sqlAdd = sqlAdd & ",'" & Request.Form("shipcountry") & " '"
End If
sqlAdd = sqlAdd & ")"

Function MyConvert(dtDate)
Dim strAns
strAns=Day(dtDate)&"/"&Month(dtDate)&"/"&Year(dtDate)
MyConvert=strAns
End Function

'Response.Write (sqlAdd&"<BR>")
'Response.END
dbc.execute sqlAdd, intAffected

-----------------------------------------------------------
INSERT INTO orders(ocustomerid,odate,orderamount,ocardtype,ocardno,ocardname,ocardexpires,ocardaddress) VALUES(100019,'3/6/2004',356.95,'Visa','4562789565415411','Tom Johnson','28/12/2006',' ')
 
Does anyone here have SQL server? If so, I could send you the files so you'll have a look for yourselves. I've been trying to get this cart to work for 3 days now, and I know I'm close. It's just incredibly frustrating right now.
 
OMG, I just found a typo in my script. The call openConn() was missing!! So now I get the error msg:

The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.
/eksamen/process.asp, linje 70


So there's got to be something wrong about the execute sqlADD, intAffected.
 
before the dbc.Execute try to dump the sqlADD value (Response.write perhaps ?) and post it.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top