General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Earl,
I'm about ready to bet that somewhere along the way you changed the DATE SETting. Your PACK would have re-created the index file with the setting THEN in effect. *IF* that was different from when you riginally built/tested the application or even last added any record(s), you would get what you are getting.
I very very very seriously doubt that any VFP index is "fragile".
Here's what you really should do:
1) Change your SEEKs to reflect the correct format for a TTOC(xxxx, 1)+cID
2) Change your index expression to be TTOC(xxxx, 1) + cID
That way you are free to SET the date to any format you want, at any time, without impacting the index or operations against it at all.
good luck
>Jim,
>
>When the user logs in a new record is added to the whoisin table. This table has 3 fields CproxyId, tIn and tOut. The default value for tIn is datetime(). After the new record is added I save the value to be used in the seek when exiting the application. The following is the code:
>
>Append Blank
>Thisform.cTimeIn = Ttoc(tIn)+cProxyId
>
>In the destroy event of the main form I then look for the user and enter the time out. The following is the code:
>
>SELECT whoisin
>SET order to cUser
>SEEK Thisformset.cTimeIn
>
>IF FOUND()
> REPLACE tOut WITH DATETIME()
>ENDIF
>
>
>The index cUser is a regular index with an expression of - Ttoc(tIn)+cProxyId
>
>When I delete any records the seek the was working now does not work. After your last post I am thinking that maybe the index isn’t bad but maybe very fragile. I missed the modifier, TTOC(tIn,1), for the TTOC command. I went into the help file and see that the “,1” is better for indexing.
>
>No settings have been changed since the index was built or last used just delete a record and it will no longer work.
>
>Thanks for the help.
>Earl
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only