| View previous topic :: View next topic |
| Author |
Message |
Raymond175 Contributor


Joined: 24 Apr 2002 Posts: 72
|
Posted: Fri Jan 20, 2006 12:16 pm Post subject: [SOLVED] VDSDLL DB working with dates in the query... |
|
|
Hello,
I'm using the VDSDLL DB functions and I'm not able to execute my query. This is not an error of the VDSDLL it seems, but an error in the SQL-code or the Microsoft Access Driver...
The query:
"SELECT date, starttime, endtime, description FROM Agenda WHERE date = 2006-01-20;"
I've got two records in the database with the date 2006-01-21 00:00:00, and I can retrieve them when I remove the WHERE of the query, but when I use the WHERE, nothing is retrieved.
I also used the following constructions:
"WHERE data = '2006-01-20';"
"WHERE data = '2006-1-20';"
"WHERE data = '01-20-2006';"
"WHERE data = '1-20-2006';"
"WHERE data = '2006-01-20 00:00:00';"
"WHERE data = '2006-1-20 00:00:00';"
"WHERE data = '01-20-2006 00:00:00';"
"WHERE data = '1-20-2006 00:00:00';"
"WHERE data = 1-20-2006;"
"WHERE data = 2006-1-20;"
"WHERE data = 01-20-2006;"
"WHERE data = 1-20-2006;"
How can I filter my results using this? Any help will be appreciated!
Thanks,
Raymond
Last edited by Raymond175 on Fri Jan 20, 2006 12:22 pm; edited 2 times in total |
|
| Back to top |
|
 |
Raymond175 Contributor


Joined: 24 Apr 2002 Posts: 72
|
Posted: Fri Jan 20, 2006 12:21 pm Post subject: |
|
|
I posted this after searching for 1,5 hours for a solution... Just a few seconds after I posted this, I found the solution:
This is a bug in the Microsoft Access Driver, the SQL Driver does not have this bug. Microsoft has 'released' a workaround: Place the date between '#', like "WHERE date = #2006-20-01#;"
More information:
http://support.microsoft.com/default.aspx/kb/175258
Greetings,
Raymond |
|
| Back to top |
|
 |
Tdk161 Valued Contributor


Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Fri Jan 20, 2006 11:11 pm Post subject: |
|
|
eheheh like always........Microsoft bug  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|