ba272
asked on
Malformed GUID in query expression
Hi,
While interacting with SQL Server, the following date format works:
SELECT * FROM Alerts WHERE CreationDateTime > {ts '2006-04-12 10:00:00'} ORDER BY ID ASC
But it generates an exception when using Access with an OleDbConnection.
What is the corrrect time stamp format for Access?
Thanks,
Bob
While interacting with SQL Server, the following date format works:
SELECT * FROM Alerts WHERE CreationDateTime > {ts '2006-04-12 10:00:00'} ORDER BY ID ASC
But it generates an exception when using Access with an OleDbConnection.
What is the corrrect time stamp format for Access?
Thanks,
Bob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or are you looking for a date format which is ## delimited
ASKER
Ok, I guess the problem is that I was attempting to incorporate a DateTime value into my query, since I had had favorable success doing so with SQL Server. What's the next best thing in Access?
If you are generating your queries in code with parameterised SQL then you could just add a datetime type parameter to your query, and set its value to a datetime from your code.
How are you generating your queries?
Andy
How are you generating your queries?
Andy
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.