forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[SOLVED] VDSDLL DB working with dates in the query...

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Raymond175
Contributor
Contributor


Joined: 24 Apr 2002
Posts: 72

PostPosted: Fri Jan 20, 2006 12:16 pm    Post subject: [SOLVED] VDSDLL DB working with dates in the query... Reply with quote

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
View user's profile Send private message
Raymond175
Contributor
Contributor


Joined: 24 Apr 2002
Posts: 72

PostPosted: Fri Jan 20, 2006 12:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Fri Jan 20, 2006 11:11 pm    Post subject: Reply with quote

Dancing Banana eheheh like always........Microsoft bug Shocked
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group