Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Help needed on ASP


Message #1 by shohokukj@y... on Sat, 16 Nov 2002 19:07:02
Hi, I keep getting this problem. I always have this error message which 
goes "Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[Microsoft][ODBC Microsoft Access Driver]Attribute cannot be set now 

/doCheckout2.asp, line 6". I can't seem to get rid of it. Will someone 
please help me with this? Below attached is the source file.

docheckout2.asp:

<%
' Add new address & payment info
updateUser

' Begin A Transaction
Con.BeginTrans


' Transfer cart to orders table
sqlString = "INSERT INTO orders (" &_
  "order_id, " &_
  "order_productID, " &_
  "order_quantity, " &_
  "order_userID, " &_
  "order_entrydate, " &_
  "order_status " &_
  ") SELECT " &_
  "cart_id, " &_
  "cart_carID, " &_
  "cart_quantity, " &_
  "cart_userID, " &_
  "NOW(), " &_
  "0 " &_
  "FROM cart WHERE " &_
  "cart_userID =" & userID

Con.Execute sqlString

' Empty shopping cart
sqlString = "DELETE FROM cart " &_
  "WHERE cart_userID=" & userID

Con.Execute sqlString


' End the transaction
Con.CommitTrans

%>
<html>
<head><title>Order Placed</title></head>
<body>

<center>
<table border=1 width=500 bgcolor="lightyellow"
  cellpadding=10 cellspacing=0>
<tr>
  <td>
  <font face="Arial" size="3">
  <b>Thank you for placing your order!</b>
  <br>You can track the status of your order
  at any time by clicking 
  <a href="account.asp">account</a> at the
  top of most store pages.
  <br>
  <form action="default.asp">
  <input type="submit" value="Continue Shopping">
  </form>
  </td>
</tr>
</table>
</center>

</body>
</html>
Message #2 by "Ken Schaefer" <ken@a...> on Mon, 18 Nov 2002 13:58:21 +1100
Where is the code where you instantiate the "con" object?

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <shohokukj@y...>
Subject: [asp_databases] Help needed on ASP


: Hi, I keep getting this problem. I always have this error message which 
: goes "Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
: 
: [Microsoft][ODBC Microsoft Access Driver]Attribute cannot be set now 
: 
: /doCheckout2.asp, line 6". I can't seem to get rid of it. Will someone 
: please help me with this? Below attached is the source file.
: 
: docheckout2.asp:
: 
: <%
: ' Add new address & payment info
: updateUser
: 
: ' Begin A Transaction
: Con.BeginTrans
: 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  Return to Index