Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / January 2005

Tip: Looking for answers? Try searching our database.

ADO Recordset Source with BETWEEN dates criteria

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Medhat Nasr - 29 Jan 2005 05:51 GMT
Hi Group,

Working with Access 2002 and SQL 2000,
For an ADODB Recordset's Source I use this syntax :

rst.Source = "SELECT GteeID, CurExpiryDte FROM " & _
"dbo.Guarntees WHERE (CurExpiryDte BETWEEN '" & _
strChkDurEnd & "' AND '" & strTodayIs & "')"
rst.Open

This only opens the correct Recordset , when the date represented
by the first date literal after BETWEEN operator, precedes the other
date,meaning when 'strChkDurEnd'  is < 'strTodayIs' .
But, if  'strChkDurEnd'  is > 'strTodayIs' it doesn't work properly, and  no
recordset opens!

I wonder if this one-direction correctly handling of the BETWEEN operator in
such a syntax, is a standard behavior of SQL ?

Thanks in advance,
Douglas J. Steele - 29 Jan 2005 13:04 GMT
AFAIK, that's standard behaviour.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hi Group,
>
[quoted text clipped - 16 lines]
>
> Thanks in advance,
Medhat Nasr - 29 Jan 2005 19:03 GMT
Thanks a lot Doug, HONEST.

> AFAIK, that's standard behaviour.
>
[quoted text clipped - 18 lines]
>>
>> Thanks in advance,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.