Malformed GUID in query expression

Posted on 2006-04-12
Medium Priority
Last Modified: 2008-01-09

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?

Question by:ba272
LVL 37

Accepted Solution

gregoryyoung earned 1400 total points
ID: 16436575
is this an actual sqlserver timestamp column? if so there is no corresponding type in access.
LVL 37

Expert Comment

ID: 16436582
or are you looking for a date format which is ## delimited

Author Comment

ID: 16436891
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?
LVL 12

Expert Comment

ID: 16438436
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?

LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 600 total points
ID: 16438516

Did you try it like this?

   SELECT * FROM Alerts WHERE CreationDateTime > '2006-04-12 10:00:00' ORDER BY ID ASC


Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question