General information
Title:
Forms' DataSessionID changes
I have created a function in a prg file that instanciates a session object with a private data session. Then it records the current cursor and DataSession, then changes to the session objects data session, loads a cursor, make changes, save changes, restores the original datasession and cursor, and returns a value.
This function is called from a form. I check the forms DataSessionID before the function is called, call the function, and then check the forms DataSessionID after the function. The ID's are different. For example, before the function is called, the ID will be 3, after the function, the ID will be 4. When I step through the code, the DataSession and Cursor are correctly restored by the function, I know because I can see the correct cursor alias and records in the VFP status bar. But when the code returns to the line following the function call, the datasession is mysteriously changed and the cursor is no longer available. The variable receiving the functions value is holding the correct value.
Does anyone have any ideas how a forms DataSessionID could change like this? Any help would be greatly appreciated!
Regards,
Don
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only