SQL Query

Results 1 to 5 of 5

Thread: SQL Query

  1. #1
    Jon Guest

    Default SQL Query

    i am having problems with the following SQL code:<BR><BR>&#039;Get the shopping cart<BR>sqlString = "SELECT * FROM cart, items " &_<BR> "WHERE cart_userID=" & userID & " " &_<BR> "AND items.ItemCode=cart.productID " &_<BR> "ORDER BY cart_cartID DESC "<BR>SET RS = Con.Execute( sqlString )<BR><BR>for some reason, i get the error message:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e10&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. <BR><BR>/shop/addCart.asp, line 97<BR><BR>when the line of SQL is written to the screen, it shows as:<BR><BR>SELECT * FROM cart, items WHERE cart_userID=10 AND items.ItemCode=cart.productID ORDER BY cart_cartID DESC <BR><BR><BR><BR><BR>any help would be great!<BR><BR>

  2. #2
    Homer Simpson Guest

    Default RE: SQL Query

    You select from two tables not showing the relationship between them

  3. #3
    Jon Guest

    Default care to expand ... ?

    &nbsp;<BR><BR>care to expand on that ...

  4. #4
    naik Guest

    Default RE: SQL Query

    check the realtionship between the tables again...

  5. #5
    Homer Simpson Guest

    Default You have to say

    where table1.field1=table2.field2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts