Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Statement Problem
Message
From
15/01/2003 22:02:20
 
 
To
All
General information
Forum:
Visual Basic
Category:
SQL Server
Title:
Select Statement Problem
Miscellaneous
Thread ID:
00742217
Message ID:
00742217
Views:
70
I'm trying to open a recordset in VB against a SQL Server Database. The criteria field is a datetime field in the table. I'm testing with two records, one with a date of 12/20/2002 and the other 1/10/2003.

A date is entered in a maskedit box on a form. If I enter the value 01/01/2003 as the date to use in the select statement. I should get a recordset with 1 record, but I keep getting both records.

rsvisits.open "select * from jovisit " & _
"where jovdate > " & cdate(mskvdate.text) & _
" order by jovdate"

I also want a similar statement using two dates and between, but I then get no records returned.

Am I coding this wrong?

Thanks

Judy Scofield
Next
Reply
Map
View

Click here to load this message in the networking platform