Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table
Message
From
22/03/1999 12:07:29
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Table
Miscellaneous
Thread ID:
00199674
Message ID:
00200524
Views:
11
>>>>What can generally cause a message 'Cannot access selected table'?
>>>>Thanks Mark
>>>
>>>A combobox that uses a table or SQL statement to populate it. Typically occurs when you're trying to exit the form and VFP is trying to requery the combobox. Not sure why this is VFP's standard behavior, but I've removed those sources from many comboboxes using a SQL query / SCAN to load the control via .AddListItem() and I've not had the problem since.
>>>
>>>Steve
>>
>>This isn't standard behavior. The table was prematurely closed.
>
>It may not be standard behavior, but it happens that way. I let the DE open and close the tables. So the question begs, when a combobox has a SQL statement to populate it, what closes the cursor? I doubt the DE does because it is probably not aware of the cursor's existence. I don't issue a USE IN combocursor command so I'm not closing it. So what is "prematurely" closing it?
>And even if the DE did close it, why is VFP trying to repopulate it when a user is trying to exit the form? I have found this behavior to be unacceptable and have done the above workaround to avoid it. But it stinks that I had to do it.
>
>Steve

Have you traced this through using the debugger and watched for the cursor to close?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform