473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Please help! Data type mismatch in criteria expression.

Hi,

I am constructing a website for a bike shop. I am using dreamweaver and an access database to create it.

I have made a query where two criteria are entered to get results. These are : Category and price(RRP).

Here is the SQL:

"SELECT Category, Description, Image, ProductRef, RRP, SalePrice FROM BOM WHERE Category = '" + Replace(Recordset1__MMColParam, "'", "''") + "' AND RRP < '" + Replace(Recordset1__MMColParam2, "'", "''") + "'"

I get the following error:

Microsoft JET Database Engine error '80040e07'

Data type mismatch in criteria expression.

First of all is my code correct?
What does this error mean?

When I use simply one search criteria i have no problems. it only occurs with the two search criteria query.

any help greatly appreciated, pulling out hair!
Apr 18 '07 #1
5 32549
pks00
280 Expert 100+
Is RRP numeric or string?
If numeric then remove the single quotes

"SELECT Category, Description, Image, ProductRef, RRP, SalePrice FROM BOM WHERE Category = '" + Replace(Recordset1__MMColParam, "'", "''") + "' AND RRP < " + Replace(Recordset1__MMColParam2, "'", "''")


What datatype is Category
Apr 18 '07 #2
thank you so much i cracked it! so simple in the end!

many thanks once more.

James
Apr 18 '07 #3
pks00
280 Expert 100+
:)

no probs
Apr 18 '07 #4
type missmatch is also removed by changinging number datatype to text data type bcz text datatype contain both text and number.

thanks
Mar 19 '12 #5
NeoPa
32,556 Expert Mod 16PB
While that may be true at a very basic level, it is certainly not a solution to the problem of how to ensure the SQL correctly matches the type of the existing data.

See post #2 for where the correct answer has already been supplied.
Mar 19 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Lodewijk van Haringhal | last post by:
I'am new with javascritping not with programming. Is there nobody who can help me with ths simple promblem? :) Please, please give me a hint. Please help me with this script. I have two lists in...
0
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web...
7
by: Alan Bashy | last post by:
Please, guys, In need help with this. It is due in the next week. Please, help me to implement the functions in this programm especially the first three constructor. I need them guys. Please, help...
2
by: tuan_vandyk | last post by:
Hi I desperately need help with my project. Theoretically everything should work bu it just isn't. Please email me for a copy of the project's source code. It was made in Turbo C++ 5. Please if...
13
by: sd00 | last post by:
Hi all, can someone give me some coding help with a problem that *should* be really simple, yet I'm struggling with. I need the difference between 2 times (Target / Actual) However, these times...
17
by: Saps | last post by:
Hi all. Can anyone help me here. I have loads of .sql files and i need a way to call these from my asp page so the user can run them from the browser. Meaning i have a page with a list of all...
8
by: CM | last post by:
Hi, Could anyone please help me? I am completing my Master's Degree and need to reproduce a Webpage in Word. Aspects of the page are lost and some of the text goes. I would really appreciate it....
7
by: Mickyd1561 | last post by:
Hey everyone I'm new to this groups thing and thought maybe someone can help me. My problem is that I can't view specific images on only one website. www.baseballu.net is my baseball team's...
0
by: 2Barter.net | last post by:
newsmail@reuters.uk.ed10.net Fwd: Money for New Orleans, AL & GA Inbox Reply Reply to all Forward Print Add 2Barter.net to Contacts list Delete this message Report phishing Show original
5
by: tabani | last post by:
I wrote the program and its not giving me correct answer can any one help me with that please and specify my mistake please it will be highly appreciable... The error arrives from option 'a' it asks...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.