Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set Commands for Private data sessions.
Message
From
19/02/2003 17:09:47
 
 
To
19/02/2003 17:06:02
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00755214
Message ID:
00755235
Views:
9
>>>What is the best way to set "SET COMMANDS' for private data sessions. I was think of putting them in a procedure and calling it from the init method of the form. Is this a reasonable approach or is there a better way?
>>
>>Putting it in the Init of the form is more than likely too late. Call your procedure from the Load event of the form, that way the SET commands will take effect before any of the controls on the form are instanciated. If you use data environments, you may need to put you call in the BeforeOpenTable event of the dataenvironment.
>
>Is putting commands in a procedure called from either load or beforeopentable method the best way to set the commands?

It is unless you want to repeat all those commands in lots of places. In VFP8, you can subclass a dataenvironment, but in earlier versions, you could not. You could put the commands in your baseclass form.Load, but you might be better off with just your function call there instead, but you still might need them in your dataenvironment. At least if you have it in a .PRG, you only have one place to change if you need to modify your mix of SET commands.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform