Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index doesn't work after deleting records
Message
From
19/06/2002 11:55:18
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00669892
Message ID:
00670166
Views:
24
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
Map
View

Click here to load this message in the networking platform