Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data sessions and updating records

Status
Not open for further replies.

paulthibodaux

IS-IT--Management
Apr 4, 2002
20
US
My application is using legacy 2.6 databases (free tables) and all forms are set to private data sessions. Tables are being opened by the forms not in a startup routine. On one form a sequence number is used and replaced with the next sequence number but this had some odd effects so the data session on that form was changed to the "Default" data session. This solved the problem with the incrementing number but now seek and indexseek are not working properly.

Anyone with any ideas?
 
I use free tables as much as possible, opening just as you described, using seek, seek(), lookup() etc with no problems. Both private and default datasessions.

You must be doing something else. Need more info.
 
I don't know what else I can tell you. Switching the form from private session to default data session stops indexseek from working. That's all I did to cause this problem. Possibly approching this form the initial problem will help. In private data session, I lock the record in a one record table, replace the value, then unlock. Sometimes when the new value is asked for the old value is returned. This is a multi user application but this has happened from one machine. Changing the session to default corrected the original problem but introduced the seek problem. Hope this helps I'm perplexed...
 
-) use private datasession, so all tables are open as desired with correct relations, filters, order.
-) if multi user, buffer the tables where required
-) when data is entered and the save button/method is called be sure to tableupdate() each buffered table
-) refresh the form
-) all data should be correct

Always works for my programs in multi-user environment. And I never lock records. I let foxpro take care of it.
PS: Until you fully understand buffering it can cause the situation you described. Hope this helped get you started.
 
Thanks. I'll try what you suggest although I am not using buffering (0) I may change to buffered and see what happens.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top