Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 24th, 2006, 05:16 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default Date criteria expression

Hi there!


I'm getting an exception while fetching a row from Access with where clause in [date] column.


My statement is:

   SELECT s_date FROM table1 WHERE s_date='10-12-2006';


Exception Generating:

    Data type mismatch in criteria expression.



Thanks.

Deepak..
__________________
DPK..
 
Old February 24th, 2006, 10:07 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

if s_date is a date field the data should be between #10-12-2006#;

HTH

Gonzalo
 
Old February 24th, 2006, 11:47 PM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default

Thanks Gonjalo!
Now I got it.
:)

Deepak..





Similar Threads
Thread Thread Starter Forum Replies Last Post
data type mismatch in criteria expression coreyjustin Classic ASP Basics 1 December 10th, 2007 06:49 PM
Data type mismatch in criteria expression Tawanda BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 0 May 5th, 2007 05:29 PM
data type mismatch in criteria expression xigler Access 3 March 23rd, 2007 08:54 AM
Data type mismatch in criteria expression. imercha Classic ASP Basics 3 November 23rd, 2006 11:09 AM
Data Type Mismatch in criteria expression dreviklou812 Access 4 March 18th, 2005 04:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.