|
-
Access And SQL date statement
Hi All
I have this Select statement that access some date field that I use to access
an Access Database. This statement works fine.
THE STATEMENT:-
cmdstring = "SELECT shft, datevalue(#" & NowDate & "#) + adjust_nr FROM shift_tm
where #" & _
NowTime & "# between start_tm and end_tm"
But then, my program should not only access MS Access Database but it should
also be able to access SQL Server database as well.
So when I execute my program, it prompts me error for the above statement.
Error is:-
Incorrect syntax near '#'.
Can anyone suggest a statement that works for both the Access Database as
well as the SQL Server database.
rgds,
Saiful
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks