Access And SQL date statement
I have this Select statement that access some date field that I use to access
an Access Database. This statement works fine.
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.
Incorrect syntax near '#'.
Can anyone suggest a statement that works for both the Access Database as
well as the SQL Server database.
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