Author |
Topic |
|
Astralis
Senior Member
USA
1218 Posts |
Posted - 29 August 2001 : 01:33:04
|
I'm working on a bookstore application which is open source and I've run into a problem which I can't solve.
I'm receiving information from another page and I receive this error:
Microsoft VBScript compilation error '800a03ea'
Syntax error
/qpstore/verisignreturn.asp, line 89
cn.execute("insert into invoices (member_id, invoice_id) values (" & --------------------------------------------------------------------^
The code where this comes from is as follows:
dim pnref dim result dim respmsg pnref = getParam("PNREF") result = getParam("RESULT") respmsg = getParam("RESPMSG") response.write "<font color=red>" & respmsg & "</font><br>" if result = 0 then cn.execute("insert into invoices (member_id, invoice_id) values (" & Session("UserID") & ",'" & pnref & "')") cn.execute("insert into purchases (invoice_id, order_id, member_id, item_id, quantity) select '" & pnref & "', order_id, member_id, item_id, quantity from orders where member_id = " & Session("UserID")) response.write "Thank you for shopping with us.<br> For you records, the reference number for this transaction is:<font color=red>" & pnref & ". Please continue by pressing the link below to make your payment with PayPal - it's fast, free, and secure."</font><br>" else response.write "This transaction was not apporved.<br> Please adjust your payment details and try again." end if
If any ASP gurus knows how to fix this, please help. Thanks!
|
|
big9erfan
Average Member
540 Posts |
Posted - 29 August 2001 : 01:48:59
|
If you have the SQL broken onto seperate lines you need to add the _ to make it keep reading at the next line.
cn.execute("insert into invoices (member_id, invoice_id) values (" &_ Session("UserID") & ",'" & pnref & "')")
http://www.ugfl.net/forums |
|
|
Craig from Alberta
Starting Member
Canada
7 Posts |
Posted - 29 August 2001 : 11:24:22
|
Aren't you maybe missing a couple of these (')
Instead of: cn.execute("insert into invoices (member_id, invoice_id) values (" &_ Session("UserID") & ",'" & pnref & "')")
Try: cn.execute("insert into invoices (member_id, invoice_id) values ('" &_ Session("UserID") & "','" & pnref & "')")
|
|
|
|
Topic |
|
|
|