Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6634859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:58:48+00:00 2026-05-25T22:58:48+00:00

What am missing in code? Any suggestions? Error display like this:- Error Type: Microsoft

  • 0

What am missing in code?
Any suggestions?

Error display like this:-

Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'orderID =1AND productID ='.
/mcartfree/addToCart.asp, line 49

Code is so far

'Main program 
 Sub CreateNewOrder()
    Application.lock
    if Application("orderID") = "" then
        Application("orderID") = 1
    end if


   intOrderID = Application("orderID")
   Session("orderID") = intOrderID
   Conn.Execute("INSERT INTO orders " _
    & " (orderID, status) values " _
    & " ("&intOrderID&", 'OPEN')")

    Application("orderID") = Application("orderID") + 1
   Application.Unlock
End Sub

Sub AddToOrder(nOrderID, nProductID, nQuant)
    sqlText = "INSERT INTO itemsOrdered " _
        & " (orderID, productID, quantity) values " _ 
        & " ("&nOrderID&", "&nProductID&", "&nQuant&")"
    Conn.Execute(sqlText)

End Sub


'Main program 
intProdID = Request.form("intProdID")
intQuant = Request.form("intQuant")

set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open ConString

intOrderID = cstr(Session("orderID"))
if intOrderID = "" then
   CreateNewOrder
end if

sqlText = "SELECT * FROM itemsOrdered WHERE orderID =" & intOrderID & "AND productID =" & intProdID
set rsOrder = Conn.Execute(sqlText)

if rsOrder.EOF then
    txtInfo = "This item has been added to your order."  
    AddToOrder intOrderID, intProdID, intQuant
else
    txtInfo = "This item is already in your cart."
end if

New Error

Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/mcartfree/addToCart.asp, line 19

Now again the new error

Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/mcartfree/addToCart.asp, line 31
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:58:48+00:00Added an answer on May 25, 2026 at 10:58 pm

    Probably you are missing whitespace orderID = 1 AND productID = instead of orderID =1AND productID =.

    I your case system can’t find AND operator becuase it’s represented in query like value 1AND for orderId field.

    Update your query with the following:

    sqlText = "SELECT * FROM itemsOrdered WHERE orderID = " & intOrderID & " AND productID = " & intProdID
    set rsOrder = Conn.Execute(sqlText)
                                                         ^                  ^               ^
                                                     whitespace         whitespace!!!   whitespace
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am I missing something? I use this simple code <a name=fb_share type=button href=https://www.facebook.com/sharer.php?u=123.abc.comt=TEst>share on
I have this code, I know I'm missing something but don't know what. It
I might be missing something basic here, but I'm stumped on this error: model
I don't see where this code is creating this NoMethodFound error, and would really
Hi i am missing the color code of my web.config files in Visual studio
I know the code is missing (Someone will give negative numbers). But I only
What's missing in the following code, for the .Caption gets bellow and the icon
I have a missing reference listed in my References list (in the VBA Code
I am using the web.config code below to redirect requests to missing pages to
How can I make this code work? class Meta @array = [:a,:b] def self.method_missing(name,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.