OutFront Forums
     Home    Register     Search      Help      Login    

Sponsors
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

 

Data Type Mismatch in criteria expression??

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Data Type Mismatch in criteria expression??
Page: [1]
 
 
patturkington

 

Posts: 9
Joined: 6/17/2003
Status: offline

 
Data Type Mismatch in criteria expression?? - 6/18/2003 14:18:48   
I would appreciate any help with the following error message. I' m trying to use several fields to filter records in a database. I would like to include a date field to search by a specific date but everytime I include the date as a search field I get the following. I' m a novice sorry if this is trivia stuff!

Database Results Error
Description: Data type mismatch in criteria expression.
Number: -2147217913 (0x80040E07)
Source: Microsoft JET Database Engine

_____________________________

patsy
bobby

 

Posts: 11818
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Data Type Mismatch in criteria expression?? - 6/18/2003 14:40:12   
In your SQL query expression you' re probably missing the #' s

It should look something like:

" select * from Table where Date=#" & request.form(" date" ) & " # ;"

Dates need to be surrounded by #' s in order to be processed as date/time

_____________________________

Talk to your kittens about catnip, or someone else will.


:)

(in reply to patturkington)
patturkington

 

Posts: 9
Joined: 6/17/2003
Status: offline

 
RE: Data Type Mismatch in criteria expression?? - 6/18/2003 17:45:50   
Thanks Bobby - I have tried that but am still getting the same error - I' m using the DRW, where do the # marks go in this custom query?

SELECT * FROM Results WHERE (Date = ' ::Date::' )

Thanks

(in reply to patturkington)
Spooky

 

Posts: 26722
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Data Type Mismatch in criteria expression?? - 6/18/2003 19:29:27   
That query is ok as FP accepts both ' and #
However, " DATE" is a reserved word and shouldnt be used as a column name.
If you cant change it then, do :

SELECT * FROM Results WHERE ([Date] = ' ::Date::' )

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

Sp:)ky


(in reply to patturkington)
patturkington

 

Posts: 9
Joined: 6/17/2003
Status: offline

 
RE: Data Type Mismatch in criteria expression?? - 6/18/2003 20:14:07   
Thank you for your help - I' ve tried the above and even changed the name of my date column but still I' m getting the data mismatch error, the only time it doesn' t appear is when I take the date field off as a search field - but I do need to filter by date - any other ideas????

(in reply to patturkington)
Spooky

 

Posts: 26722
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Data Type Mismatch in criteria expression?? - 6/18/2003 21:44:28   
Are you always passing a date? If its null, youll need to enter a default date at step 3 of the DRW or include a default date in the text box when the search page is first entered.

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

Sp:)ky


(in reply to patturkington)
patturkington

 

Posts: 9
Joined: 6/17/2003
Status: offline

 
RE: Data Type Mismatch in criteria expression?? - 6/19/2003 3:03:56   
I' ve just looked on the Frontpage site and their response is to change the data type for the column to text. This works fine but how do you sort the results in date order????

_____________________________

patsy

(in reply to patturkington)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Data Type Mismatch in criteria expression??
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts