Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting records from SQLServer based on date/time fiel
Message
From
08/03/2006 11:31:05
 
 
To
08/03/2006 11:06:03
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01102278
Message ID:
01102466
Views:
16
Thanks for your response. I can't say I've ever seen the ? construction (input parameter, according to documentation?) before. Good thing to learn. Thank you very much -- now that I know this, it'll certainly make creation of future SQLEXEC expressions much easier.

Jim

>
?SQLEXEC( 1, "Select * from MyTable where between(crtd_datetime, m.startdate, m.enddate)")
>
>You're sending text strings "m.startdate" and "m.enddate" to the server. You need
SQLEXEC( 1, "Select * from MyTable where between(crtd_datetime, ?m.startdate, ?m.enddate)")
Also, you might need to use DTOT() if the field types on the back end are DateTime and yours are only dates.
Jim Nelson
Newbury Park, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform