Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving code from de.beforeopentables to form.load
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00186197
Message ID:
00186229
Views:
18
Ahhhhh... That is it. Thanks.

One problem though. It chokes on tables that aren't in the database.

>Didn't know that. What happens if you do
>DE.OpenTables()

>>The code looks good. I was hoping to avoid the "use" statement and that I could issue a "reload" or "requery" to the dataenvironment. The USE statement is not as fast as letting the dataenvironment open the tables itself.
>>
>>>I don't know the syntax, but if there's some way to loop through the cursors, you could just USE each one.
>>>
>>>Maybe
>>>
>>>For i = 1 to de.controlcount
>>>x = "de.cursor"+allt(str(i))+".cursorsource"
>>>USE (x) in 0
>>>endfor
>>>
>>>No clue if that works. :) But maybe will get you down the right track?
>>>
>>>-Michelle
>>>
>>>
>>>>Hi Michelle.
>>>>
>>>>Actually. That is the part I knew. :-}
>>>>How do I then open all cursors in the DE?
>>>>
>>>>>Would setting AutoOpenTables to .F. work?
>>>>
>>>>>>I am moving the code that points my dataenvironment's cursors to the proper directory from the dataenvironments beforeopentables event to the forms (actually the class's) load event. The code is
>>>>>>
>>>>>>thisform.SetAll("Database",gcAppPath+"\database\patdb.dbc","Cursor")
>>>>>>
>>>>>>I am getting the error "property setting will not take effect until the data environment is loaded". I assume is is because the cursors are already open before the load event. How do I delay the opening opening of the cursors and then open them manually?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform