Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: ASP problem!!!!!


Message #1 by shohokukj@y... on Sat, 16 Nov 2002 16:13:43
Can someone please help me with this codes cos I always get this error 
message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

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

/doCheckout2.asp, line 7 

Please help cos I need it urgently. Thanks to whoever it may be!!!!

Here's the source codes for 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 Mark Eckeard <meckeard2000@y...> on Sat, 16 Nov 2002 08:16:00 -0800 (PST)
Don't you need to select the fields from the table
"cart"?


--- shohokukj@y... wrote:
> Can someone please help me with this codes cos I
> always get this error 
> message:
> Microsoft OLE DB Provider for ODBC Drivers error
> '80004005' 
> 
> [Microsoft][ODBC Microsoft Access Driver]Attribute
> cannot be set now 
> 
> /doCheckout2.asp, line 7 
> 
> Please help cos I need it urgently. Thanks to
> whoever it may be!!!!
> 
> Here's the source codes for 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>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
Message #3 by shohokukj@y... on Sat, 16 Nov 2002 17:13:33
I am always getting this error message which read:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

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

/doCheckout2.asp, line 6 


I will attach the file here. Anyone please help me cos I need this file 
urgently. Thanks to whoever it may be.

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>

  Return to Index