Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET DATASESSION usage
Message
From
22/06/2000 11:58:22
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
SET DATASESSION usage
Miscellaneous
Thread ID:
00383218
Message ID:
00383218
Views:
47
Hi all!

In VFP6's help about the SET DATASESSION command, there is this paragraph:

SET DATASESSION is typically used to debug forms, and should not be issued when a form is active.

However, I have this scenario: I have an object that talks to SQLServer (doing the SELECTs, INSERTs and so on). I created this object in my main prg because I want to share it for all forms - no need to have more than one connection. Forms use private datasessions, of course.

However, if, from a form, I call my SQL object to do a query, it executes the query in datasession 1 (default datasession), not in the form's datasession.

Is it acceptable in such a case to use the SET DATASESSION command in my SQL object so that the query will run in the form's datasession? This is what I'm currently doing and I haven't run into any problem, but does anyone ever has? Or is there a better way of doing this?

Thanks!
Sylvain Demers
Next
Reply
Map
View

Click here to load this message in the networking platform