Please, please help, I am desperated...:( 
Author Message
 Please, please help, I am desperated...:(

Microsoft JET Database Engine (0x80040E14)
Syntaxisfout (operator ontbreekt) in query-expressie products.productID =
itemsOrdered.productID and itemsOrdered.orderID = 17and
 itemsOrdered.productName = and itemsOrdered.productPrice =.
 /mcartpal/reviewOrder.asp, line 105

Code:


<% pageTitle = "Review Order" %>
<!--#include file="adovbs.inc"-->
<!--#include file="db.asp"-->

<%
'******************************************************

'******************************************************

%>
<html>
<head>
<meta name="GENERATOR" Content="Microsoft Visual Studio 6.0">
<title><%= pageTitle %></title>
<script LANGUAGE="JavaScript"><!--

 function AbortEntry(sMsg, eSrc)
 {
  window.alert(sMsg);
  // set focus and highlight to the offending error
  eSrc.focus();
  //eSrc.select();
 }

 function HandleKeyUp(eSrc)
 {
  // make sure the input is a numeric value
  var val = parseInt(eSrc.value);
  if (isNaN(val))
  {
   return AbortEntry("Must be a number.", eSrc);
  }

  // make sure the value is not negative
  if (val < 0)
  {
   return AbortEntry("Number cannot be less than zero.", eSrc);
  }
 }

//-->
</script>
<style type="text/css">
<!--
a:link       { color: #808080 }
a:visited    { color: #808080 }
a:hover      { color: #6699cc }
-->
</style>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginwidth="0"
marginheight="0" text="#808080">
<basefont face="Verdana" size="2">
<!-- #include file="header.asp" -->
<!-- #include file="menubar.asp" -->
<hr color="#cccccc" size="1" noshade>
<table border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0"
width="625">
  <tr>
    <td width="128" valign="top" align="center">
      <table border="0" cellspacing="4" cellpadding="4" width="125">
        <tr>
          <td width="128" bgcolor="#FFFFFF">
          <!-- #include file="left.asp" -->
          </td>
        </tr>
      </table>
    <td width="1" bgcolor="#000000"><img src="images/spacer.gif" width="1"
height="1" alt border="0"></td>
     <td align="left" valign="top"><table border="0" cellspacing="4"
cellpadding="4"><tr><td>
<%
    set Conn = Server.CreateObject("ADODB.Connection")
    Conn.Open ConString

     if cstr(Session("orderID")) = "" then
        Response.Write "<div align='center'>"
        Response.Write "<p><font face='Verdana' size='4'><b>"
        Response.Write "U heeft nog niets besteld." & "<br>"
        Response.Write "Indien u eerder produkten in uw wagentje zette, "
        Response.Write "heeft uw sessie een time-out.<br><br>"
        Response.Write "<a href='default.asp'>Verder winkelen</a>"
        Response.Write "<b></font></p>"
        Response.Write "</div>"
    else
        intOrderID = cstr(Session("orderID"))

        sqlText = "select products.productID, productName, " _
            & "productPrice, quantity from products, " _
            & "itemsOrdered where " _
            & "products.productID = itemsOrdered.productID "_
            & "and itemsOrdered.orderID = " & intOrderID _
   & "and itemsOrdered.productName = " & strprodName _
   & "and itemsOrdered.productPrice = " & intprodPrice
%>
<p><font face="Verdana" size="4"><strong>Review Your
Order</strong></font></p>
<p><font face="Verdana" size="2">Please review your order to be certain it
is correct.
        To remove an item, set the quantity to zero and press the Update
Order button.</font></p>
   <form action="checkout1.asp" method="post" id="form1" name="form1">
 <table border="1" cellpadding="3" cellspacing="3" width="100%">
     <tr bgcolor="#6699cc">
       <td width="15%" align="left" valign="center" nowrap><font
color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR:
#6699cc"><strong>Quantity<strong></font></strong></strong></td>
       <td width="44%" align="left" valign="center" nowrap><font
color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR:
#6699cc"><strong>Product Name<strong></font></strong></strong></td>
            <td width="16%" align="left" valign="center"><font
color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR:
#6699cc"><strong>Unit Price<strong></font></strong></strong></td>
            <td width="25%" align="right" valign="center" nowrap><font
color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR:
#6699cc"><strong>Extended Price<strong></font></strong></strong></td>
      </tr>
<%
set rsReview = Conn.Execute(sqlText)
<-----------------------------------------this is the line
while not rsReview.EOF
      intProdID = rsReview("productID")
      strProdName = rsReview("productName")
      ProdPrice = rsReview("productPrice")
      intQuant = rsReview("quantity")
      intTotal = intTotal + (intQuant * intProdPrice)
%>
  <tr>
            <td width="15%" valign="center" align="left"><font
face="Verdana" size="2">
                <input name="quant<%= intProdID %>" size="6" value="
<%=intQuant%>" onSubmit="HandleKeyUp(this)">
                </font></td>
                <td width="44%" align="left"><font face="Verdana"
size="2">&nbsp;<%= strProdName %>
          </font></td>
          <td width="16%" align="right"><font face="Verdana" size="2">
               $<%= formatNumber(intProdPrice, 2) %>
          </font></td>
          <td width="25%" align="right"><font face="Verdana" size="2">
               $<%= formatNumber((intQuant * intProdPrice), 2) %>
           </font></td>
      </tr>
<%
rsReview.MoveNext
wend

rsReview.Close
set rsReview = Nothing
%>
        <tr>
            <td valign="center" align="left"><font face="Verdana"
size="2"><strong>Total:<strong></font></strong></strong></td>
            <td colspan="3" align="right" valign="center"><font
face="Verdana" size="2"><strong>
                $<%= formatNumber(intTotal,2) %>
            <strong></font></strong></strong></td>
        </tr>
        </table>
        <p><input type="submit" name="control" value="Update Order">
        <input type="submit" name="control" value="Go To Check-Out"></p>
        </form>
        <form action="default.asp" method="post" id="formx" name="formx">
        <input type="submit" name="buttonX" value="Continue Shopping">
  </form>
<%
 end if

    Conn.Close
    set Conn = Nothing
%>
</td>
  </tr>
  </table>

 </td>
  </tr>
  </table>
      <hr color="#cccccc" size="1" noshade>

<!--#include file="footer.asp"-->
</body>
</html>



Wed, 17 Nov 2004 07:30:03 GMT  
 Please, please help, I am desperated...:(
Change the following lines:
sqlText = "select products.productID, productName, " _
            & "productPrice, quantity from products, " _
            & "itemsOrdered where " _
            & "products.productID = itemsOrdered.productID "_
            & "and itemsOrdered.orderID = " & intOrderID _
            & "and itemsOrdered.productName = " & strprodName _
            & "and itemsOrdered.productPrice = " & intprodPrice

To the following lines:

sqlText = "select products.productID, productName, " & _
 "productPrice, quantity from products, itemsOrdered where " & _
 "products.productID = itemsOrdered.productID AND " & _
 "itemsOrdered.orderID = '" & intOrderID & "' AND " & _
 "itemsOrdered.productName = '" & strprodName & "' AND " & _
 "itemsOrdered.productPrice = '" & intprodPrice & "'"

Notice the changes and learn from it :)  ANywho, hope it helps....post any
other problems if you have any :)

Mythran



Wed, 17 Nov 2004 07:46:26 GMT  
 Please, please help, I am desperated...:(
Thanks, this helps a bit,
now I have another error (I hope last)

Microsoft JET Database Engine (0x80004005)
Het opgegeven veld productName kan naar meer dan een tabel verwijzen in
de component FROM van uw SQL-instructie.
/mcartpal/reviewOrder.asp, line 105

How can I fix that?

Thanks in advance

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Wed, 17 Nov 2004 08:01:39 GMT  
 Please, please help, I am desperated...:(
Well, I don't know the language :(  Maybe if you can provide a translation
and the lines 100-110 I could help you out some more :)

Mythran


Quote:
> Thanks, this helps a bit,
> now I have another error (I hope last)

> Microsoft JET Database Engine (0x80004005)
> Het opgegeven veld productName kan naar meer dan een tabel verwijzen in
> de component FROM van uw SQL-instructie.
> /mcartpal/reviewOrder.asp, line 105

> How can I fix that?

> Thanks in advance

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Wed, 17 Nov 2004 08:29:38 GMT  
 Please, please help, I am desperated...:(
Dutch - and there is no Babelfish for that...


Quote:
> Well, I don't know the language :(  Maybe if you can provide a translation
> and the lines 100-110 I could help you out some more :)

> Mythran



> > Thanks, this helps a bit,
> > now I have another error (I hope last)

> > Microsoft JET Database Engine (0x80004005)
> > Het opgegeven veld productName kan naar meer dan een tabel verwijzen in
> > de component FROM van uw SQL-instructie.
> > /mcartpal/reviewOrder.asp, line 105

> > How can I fix that?

> > Thanks in advance

> > *** Sent via Developersdex http://www.developersdex.com ***
> > Don't just participate in USENET...get rewarded for it!



Wed, 17 Nov 2004 15:29:01 GMT  
 Please, please help, I am desperated...:(

Microsoft JET Database Engine (0x80004005)
Het opgegeven veld productName kan naar meer dan een tabel verwijzen in
de component FROM van uw SQL-instructie.
/mcartpal/reviewOrder.asp, line 105

Translated:

Microsoft JET Database Engine (0x80004005)
The field productName can possible refer to more then one
t/mcartpal/reviewOrder.asp, line 105able in the component FROM of your
SQL instruction

Vivian

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Wed, 17 Nov 2004 15:41:39 GMT  
 Please, please help, I am desperated...:(
Vivian, could you post the lines of code around that also?


Quote:

> Microsoft JET Database Engine (0x80004005)
> Het opgegeven veld productName kan naar meer dan een tabel verwijzen in
> de component FROM van uw SQL-instructie.
> /mcartpal/reviewOrder.asp, line 105

> Translated:

> Microsoft JET Database Engine (0x80004005)
> The field productName can possible refer to more then one
> t/mcartpal/reviewOrder.asp, line 105able in the component FROM of your
> SQL instruction

> Vivian

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Wed, 17 Nov 2004 15:47:49 GMT  
 Please, please help, I am desperated...:(

this is the hole page:


<% pageTitle = "Review Order" %>
<!--#include file="adovbs.inc"-->
<!--#include file="db.asp"-->

<%
'******************************************************

'******************************************************  

%>
<html>
<head>
<meta name="GENERATOR" Content="Microsoft Visual Studio 6.0">
<title><%= pageTitle %></title>
<script LANGUAGE="JavaScript"><!--

 function AbortEntry(sMsg, eSrc)
 {
  window.alert(sMsg);
  // set focus and highlight to the offending error
  eSrc.focus();
  //eSrc.select();
 }

 function HandleKeyUp(eSrc)
 {
  // make sure the input is a numeric value
  var val = parseInt(eSrc.value);
  if (isNaN(val))
  {
   return AbortEntry("Must be a number.", eSrc);
  }

  // make sure the value is not negative
  if (val < 0)
  {
   return AbortEntry("Number cannot be less than zero.", eSrc);
  }
 }

//-->
</script>
<style type="text/css">
<!--
a:link       { color: #808080 }
a:visited    { color: #808080 }
a:hover      { color: #6699cc }
-->
</style>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginwidth="0"
marginheight="0" text="#808080">
<basefont face="Verdana" size="2">
<!-- #include file="header.asp" -->
<!-- #include file="menubar.asp" -->
<hr color="#cccccc" size="1" noshade>
<table border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0"
width="625">
  <tr>
    <td width="128" valign="top" align="center">
      <table border="0" cellspacing="4" cellpadding="4" width="125">
        <tr>
          <td width="128" bgcolor="#FFFFFF">
          <!-- #include file="left.asp" -->
          </td>
        </tr>
      </table>
    <td width="1" bgcolor="#000000"><img src="images/spacer.gif"
width="1" height="1" alt border="0"></td>
     <td align="left" valign="top"><table border="0" cellspacing="4"
cellpadding="4"><tr><td>
<%
    set Conn = Server.CreateObject("ADODB.Connection")
    Conn.Open ConString

     if cstr(Session("orderID")) = "" then
        Response.Write "<div align='center'>"
        Response.Write "<p><font face='Verdana' size='4'><b>"
        Response.Write "U heeft nog niets besteld." & "<br>"
        Response.Write "Indien u eerder produkten in uw wagentje zette,
"
        Response.Write "heeft uw sessie een time-out.<br><br>"
        Response.Write "<a href='default.asp'>Verder winkelen</a>"
        Response.Write "<b></font></p>"
        Response.Write "</div>"
    else
        intOrderID = cstr(Session("orderID"))

        sqlText = "select products.productID, productName, " & _
"productPrice, quantity from products, itemsOrdered where " & _
"products.productID = itemsOrdered.productID AND " & _
"itemsOrdered.orderID = '" & intOrderID & "' AND " & _
"itemsOrdered.productName = '" & strprodName & "' AND " & _
"itemsOrdered.productPrice = '" & intprodPrice & "'"

%>
            <p><font face="Verdana" size="4"><strong>Bekijk
winkelwagentje</strong></font></p>
            <p><font face="Verdana" size="2">Kijk aub uw bestelling na
voor eventuele
              fouten . Om een produkt te verwijderen, zet het aantal op
0 en klik
              op de Update Bestelling knop.</font></p>
            <form action="checkout1.asp" method="post" id="form1"
name="form1">
              <table border="1" cellpadding="3" cellspacing="3"
width="100%">
                <tr bgcolor="#6699cc">
                  <td width="15%" align="left" valign="center"
nowrap><font color="#ffffff" face="Verdana" size="2"
style="BACKGROUND-COLOR:
#6699cc"><strong>Aantal<strong></font></strong></strong></td>
                  <td width="44%" align="left" valign="center"
nowrap><font color="#ffffff" face="Verdana" size="2"
style="BACKGROUND-COLOR:
#6699cc"><strong>Produkt<strong></font></strong></strong></td>
                  <td align="left" valign="center"><font color="#ffffff"
face="Verdana" size="2" style="BACKGROUND-COLOR:
#6699cc"><strong>Prijs<strong></font></strong></strong></td>
                </tr>
                <%      
set rsReview = Conn.Execute(sqlText)
while not rsReview.EOF  
      intProdID = rsReview("productID")
      strProdName = rsReview("productName")
      intProdPrice = rsReview("productPrice")
      intQuant = rsReview("quantity")
      intTotal = intTotal + (intQuant * intProdPrice)
%>
                <tr>
                  <td width="15%" valign="center" align="left"><font
face="Verdana" size="2">
                    <input name="quant<%= intProdID %>" size="6" value="
<%=intQuant%>" onSubmit="HandleKeyUp(this)">
                    </font></td>
                  <td width="44%" align="left"><font face="Verdana"
size="2">&nbsp;<%= strProdName %> </font></td>
                  <td align="right"><font face="Verdana" size="2">
&euro;<%= intProdPrice %> </font><font face="Verdana" size="2">
</font></td>
                </tr>
                <%              
rsReview.MoveNext
wend

rsReview.Close
set rsReview = Nothing
%>
                <tr>
                  <td valign="center" align="left"><font face="Verdana"
size="2"><strong>Totaal:<strong></font></strong></strong></td>
                  <td colspan="2" align="right" valign="center"><font
face="Verdana" size="2"><strong>
                    &euro;<%= intTotal %>
<strong></font></strong></strong></td>
                </tr>
              </table>
        <p><input type="submit" name="control" value="Update Order">
                <input type="submit" name="control" value="Ga naar
Check-Out">
              </p>
        </form>
        <form action="default.asp" method="post" id="formx"
name="formx">
              <input type="submit" name="buttonX" value="Verder
Winkelen">
                </form>
<%
        end if

    Conn.Close
    set Conn = Nothing
%>
</td>
  </tr>
  </table>        

        </td>
  </tr>
  </table>
      <hr color="#cccccc" size="1" noshade>

<!--#include file="footer.asp"-->
</body>
</html>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Wed, 17 Nov 2004 16:49:37 GMT  
 Please, please help, I am desperated...:(
Vivian:

Your field "productName" (probably) exists in both tables.

Qualify your select statement:

sqlText = "select products.productID, products.productName,...

or

sqlText = "select products.productID, itemsOrdered. productName,...

Lee Haskell
http://www.Rockwest.net

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Wed, 17 Nov 2004 21:25:39 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

2. Can anyone HELP me PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE

3. PLEASE HELP PLEASE HELP PLEASE HELP

4. PLEASE, PLEASE HELP, am I going MAD - Generating Totals

5. PLEASE PLEASE PLEASE HELP!!!!

6. Help, please please please!!!! Inputing a Hexadecimal Number

7. Please Help: Why am I now getting this error

8. Boy am I lost with this stuff - please help

9. Validation of fileds Please Help I am new.

10. Design Help PLEASE PLEASE PLEASE!

11. Please Please PLEASE HELP!!!!!

12. URGENT HELP PLEASE PLEASE PLEASE???

 

 
Powered by phpBB® Forum Software