Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with seek and DateTime() index
Message
From
04/06/1999 19:51:01
 
 
To
04/06/1999 17:52:17
Dennis Schuette
Customized Business Services, Llc
Yuma, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00226705
Message ID:
00226717
Views:
25
>I am using VFP 5.0a. I have a table indexed on a Datetime field type.
>There are multiple records with the same date, but different times, and I want to position on the first record for a particular date.
>
>The problem is that the code works perfectly while running within VFP, but the seek leaves me at EOF() when I build and run within an EXE.
>
>**all of the following examples work when within VFP, but not within an EXE
>
>use mytable order datetime
>seek ctot( "05/30/99")
>seek ctot( "05/30/99 12:00:00 AM" )
>seek ctot( dtoc( ThisForm.txtBDate.value )+" 12:00:00 AM" )
>

SEEK DTOT(dMyDateToFind)
IF ! FOUND()
GO RECNO(0) && nearest >= value regardless of SET NEAR
ENDIF
IF TTOD(tDateTime) = dMyDateToFind
* You've got a match
ELSE
* no record for that date
ENDIF
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform