I have a class "ODBC_Query" that is called to execute queries (automatically creates & destroyes connection when needed).
In the beginnen of my program, I have the following line:
PUBLIC ODBC_Query
ODBC_Query = CREATEOBJECT("ODBC_Query")
So I can call the ODBC_Query from anywhere in my program.
To do a query, I do the following:
ODBC_Query.Do("select * from employee","employee")
Up to here, everything is fine but in my forms, I have private data sessions.
When I do "ODBC_Query.Do(...)" in a form with a private data session, he creates the result set in the "default" data session (in which the class was created) but not in the current active (private) data session.
Is there any easy way to fix this??
I know you can set the datasession to another data session with "set datasession to" but then I have to change all the code where I allready used the "ODBC_Query.Do()" because I need to send an extra parameter :-/
Any other easy solution?
Please help!
Start Free Trial