Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group Header Showing Last Group Info
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01351054
Message ID:
01351616
Views:
17
This turned out to be another quirk with having the same table open multiple times... which I swear was introduced in VFP9.

I had code in a textbox in the report itself that was calling a UDF. The UDF was
1. checking if a table was open under it's regular alias
2. issuing a reccount() and a if not eof() go recno() in alias() for the regular alias (these 2 things I found eliminate 99.9% of cached data issues in multiuser .dbc's)
3. opening the same table again with an alias and doing some stuff with the alias
4. then closing the alias and returning the selected table to it's starting state.

As soon as I did away with the step 1 and 2 the problem went away. The weird part is that the table is already open under it's standard alias (tablename) (step 1 part) so the only code that's truly getting skipped is my data cache prevention lines on the regular alias (step 2), even though, as you can see, the code doesn't change the recno().

On my statement VFP9 table open again quirks:
When I moved my application from VFP8 to VFP9 I started getting weird behaviors relating to having the same table open multiple times. The behavior only seemed to manifest itself when I left the table open under it's alias alongside the standard alias. Once I discovered this I started systematically closing all AGAIN aliases leaving only the standard alias (same as the tablename) open and the quirks disappeared.

The problem with my report seems to have been another manifestation of this multiple open table alias behavior. Maybe it has to do with my data caching prevention techniques... who knows.... but I do know it wasn't a problem until VFP9 (maybe specific to SP2... I can't remember).


Any thoughts?
Brandon Harker
Sebae Data Solutions
Previous
Reply
Map
View

Click here to load this message in the networking platform