>>>I have established a remote connection to an Oracle database and am creating cursors on the fly (as needed). If a user selects a specific option, a SQL statement is submitted through SQLEXEC() function. This statement has already been optimized, tested, etc. The problem arises when I change the Form's datasession to Private. The query fails to return any results. If I revert to the Default datasession the query returns the correct results. Compounding this problem is that a different SQL statement that is issued under either condition works.
>>>
>>>Anyone with suggestions on this?
>>
>>more information: in Form1 I set the datasession to Private, in the VIEW window (VFP3) the datasession says "form1(2)". I launch form2 from this form. Form2 has data session set to default (which in this case means the private DS from form1). In the view window, the datasession combobox now says "form2(2)". All the tables opend by form2 are there along with the 1 table that was opened on form1. When I exit form2 (close & release), I return to form1. The datasession in the view window now says "unknown(2)" and the 1 table that I had open before going to form 2 is the only table left open (which is correct).
>
>Figured it out. Private DEs are too dang frustrating when it comes to what is "SET" in VFP. The problem SQL query had a date filter and SET CENTURY was set OFF in the Private DS, but ON in the Default DS.
Since you replied to yourself twice I could at least do it once <g>.
Check out the online help for SET DATASESSION. It contain a list of all the environment settings that are scoped to a private datasession.
-Mike