Link to home
Start Free TrialLog in
Avatar of ba272
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
ASKER CERTIFIED SOLUTION
Avatar of gregoryyoung
gregoryyoung
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
or are you looking for a date format which is ## delimited
Avatar of ba272
ba272

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
SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial