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