Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extremely private data sessions
Message
From
29/04/1997 18:03:46
 
 
To
29/04/1997 17:24:09
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00030137
Message ID:
00030188
Views:
33
>>I'm trying to make a data session private yet updatable. The problem is that the form creates a second data session, but leaves the Fox environment in session 1, so when I issue commands, even from within the form, I get "Cannot find mytable" messages, until I go to the view window and manually change the data session to 2. My quetions is: How do I tell the form where to find its own data session? Hopefully someone can me a simple answer, and perhaps an explanation of why things work this way.
>
>As Colin mentioned, you will be better to use the form data environment to access your tables. In that way, the record pointer made in those tables, etc. will not affect the status of the same tables which may be opened in the default data session.
>
>However, at the startup of your application, you can save the data session id and do SET DATASESSION TO gnDataSessionId to temporary access the tables in the default data session. After the process, you can then switch to your form data session to be back to the current data session.

I have tried building a form using the tables in the data environment; the problem I had was in setting a filter to limit the amount of data accessed by the user. There was also a problem in that as a user skipped through the parent table, there was no way to control the child record order, i.e. alphabetizing the data became impossible. I thought this was what views and SQL were meant to do. As a postscript, I have fixed the problem of private data sessions being too private, but now in updating the records on the form I get a message saying "SQL Statement too long." Any ideas? I can see I'm going to have to do some more thinking...

thanks for your input,

--M. Ramberg.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform