Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Database query help please????

Status
Not open for further replies.

Bretto

Technical User
Oct 17, 2001
59
AU
Can someone please help me with this I have benn looking at it for far to long.

I am connecting to an Access database using an OleDBConnection in an ASP.Net page written in C# and for some reason this query does not return the required results.

Select TimeStamp, ClientIP, Ident, URI From SquidAccessLog where TimeStamp Between #28/02/2005 6:54:16 PM# AND #1/03/2005 6:54:16 PM# AND Ident='lindsaybit\administrator' order by TimeStamp Asc

I am expecting results starting at 28/02/2005 6:54:16 and ending at 1/03/2005 6:54:16 but I am getting results between 27/02/2005 11:45:19 PM and 28/02/2005 12:14:57 PM.

I have run the same query with access to see if it was one of my time functions causing the problem and I am getting the same result.

Please Help
 
Bretto: Have you tried this same query using the following date format?

#2/28/2005 6:54:16 PM#

..as a test? (i.e., mm/dd/yyyy)



 
Bretto - I would follow Isadore's advice - Try creatin gthe query actually in MS Access (in the design window) ad then have a look at the SQL it has generated. It may give you a clue as to whether it is a date format problem.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Cheers GuysThat was it.

I new I had spent far to much time on this for it not to be something simple.

Thanks heaps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top