Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving code from de.beforeopentables to form.load
Message
From
10/02/1999 16:48:14
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00186197
Message ID:
00186232
Views:
20
What do you mean "chokes on"? Does it tell you it can't find it? Is there a hard coded path in the DE for these tables? If so, you may have to loop through scanning for those whose database property is empty and adjust the path.

-Michelle


>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
Reply
Map
View

Click here to load this message in the networking platform