Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Free tables slow
Message
From
17/03/2017 08:53:13
 
 
To
16/03/2017 15:53:14
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01649107
Message ID:
01649120
Views:
59
>>>Hi
>>>
>>>For a long time, some parts of my software works slow on the network.
>>>
>>>Today I found that acces to free table cause the problem.
>>>
>>>I used to opens and closes the free tables every time that I access to tables.
>>>
>>>Question is whether this is because antivirus,
>>>or work with external free tables is very slow,
>>>or I have to leave them open all the time,
>>>Or any other help.
>>
>>Opening files is one of the slowest operations you can do. What some people like to do is open all their tables when the application starts, and leave them open. If you're using private data sessions in your forms, you can just open the tables in the forms, and they'll use the already open files.
>
>Tamar-
>
>Are their risks with opening the tables all at once in the main application form (I use a main top-level form)? I have always opened the tables that are needed in the form's data session (private) in order to reduce the possibility (or so I think...) of corruption of the dbf tables if power failure or other cause. Having only the tables in a form open reduces the number of 'exposed' tables. As far a data updates, I always load the tables into cursors for the rows that are to be manipulated and then only save these back (my own cursoradapter). I do the updates in a BEGIN-END TRANSACTION block with ROLLBACK on failures.

My understanding is that having a table open when power goes out doesn't by itself cause corruption. It's when there's an operation underway when the power goes out that you have trouble.

FWIW, I'm not sure I've ever seen table corruption in nearly 30 years of Fox work. I have occasionally seen corrupted indexes,

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform