HomeActive Query BuilderAQB Write "Date"

AQB Write "Date"


Hello!

How is possible to write date in the Criteria field that is properly evaluated in SQL?
Now I've always get '#11/10/08#' in quotes ''. Any help?
Danilo | email
February 3 2009, 07:11 AM
You can either use dd/mmm/yyyy (eg '3/Feb/2009') or all numerics mm/dd/yyyy ('02/03/2009').

I prefer the first form, as it is unambiguous.
Joe Griffin | email
8 hours, 30 mins since original post
Joe is right.

Quoting dates with hashes is possible for MS Access only. Other servers require dates quoted with apostrophes.
Sergey Smagin | email
22 hours, 45 mins since original post
Hello!

I did that but I still have problems. Application is still old with Microsoft Access 97 and DAO. When I try and insert
date with #01/01/2008# directly into SQL sentence it works otherwiese not! Any idea?

Regards!
Danilo | email
1 day, 20 hours since original post
Dear Danilo,

Working with MS Access you should write criteria for date fields as follows:

= #11/10/08#

If you get dates with hashes quoted, then you set wrong syntax provider. Please check what syntax provider is connected to your query builder object (see the SyntaxProvider property for VCL and .NET Editions and the SQLSyntax for ActiveX Edition).
Sergey Smagin | email
1 day, 20 hours since original post
Hello!

I'm using FREE edition of AQB. Can you tell me how can I set this property in VB vith ActiveX control?
Danilo | email
3 days, 21 hours since original post
I do not recommend you to work with MS Access with the Free version exactly because of the date constants quotation with hashes and other special features of its SQL syntax. MS Access syntax provider is not included in the Free version.
Sergey Smagin | email
4 days, 18 hours since original post
This topic is closed