Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index doesn't work after deleting records
Message
From
19/06/2002 15:32:26
 
 
To
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:
00670270
Views:
17
Jim,
I am not going to worry about what settings might have been changed. I can go in add a record then open the table delete a record and pack and it breaks. However, I already changed both thw index and the seek to use the ",1" and all is happy.

Thanks for your help.
Earl

>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
Reply
Map
View

Click here to load this message in the networking platform