Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Why do I get this error?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Astralis
Senior Member

USA
1218 Posts

Posted - 29 August 2001 :  01:33:04  Show Profile  Send Astralis a Yahoo! Message
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  Show Profile
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
Go to Top of Page

Craig from Alberta
Starting Member

Canada
7 Posts

Posted - 29 August 2001 :  11:24:22  Show Profile  Visit Craig from Alberta's Homepage
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 & "')")







Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07