CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Data type mismatch in criteria expression

Print topic Send  topic

Author Message
raymondbell@hotmail.com
Posted: 10/14/2002, 6:06 AM

Why am i getting this problem with ASP SQL query??

Error: Data type mismatch in criteria expression. (Microsoft JET Database Engine)
SELECT * FROM calendar WHERE event_date >= '01/01/2001' and event_date <= '29/12/2001' ORDER BY event_date
info@djborg.com
Posted: 10/14/2002, 12:21 PM

The SELECT statement you used is treating the dates wrong (if the fields are date fields in Access)

You had:
SELECT * FROM calendar WHERE event_date >= '01/01/2001' and event_date <= '29/12/2001' ORDER BY event_date

Try:
SELECT * FROM calendar WHERE event_date >= #01/01/2001# and event_date <= #29/12/2001# ORDER BY event_date

I hope this helps...
Ray Bell
Posted: 10/15/2002, 3:20 AM

Cheers DJ Borg.

I had to change the source typr to sql instead of table which i was using..cheers again

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.