Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and the great PAGE FAULT
Message
From
10/09/1998 11:54:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00135048
Message ID:
00135102
Views:
11
>>I have a form that has a private datasession, in the load method of the form I make a call to a method of my application object to open a table in the current data session. e.g.
>>
>>oApp.OpenTable('CODE40','SIR','sir_ndx',.F.,.F.,lnDataSession)
>>
>>where CODE40 is the system, SIR is the table, sir_ndx is the tag to set, .F. I dont want exclusive open, .F. I dont wnat a new area to open table in (no select 0), and lnDataSession is the numeric value from the SET('DATASESSION') command so the method will open the tables in the correct datasession.
>>
>>The first time the form loads everything is fine, but when I close the form and open it again I get the very usefull message this program has performed an illegal operation and the details show a page fault.
>>
>>If I remove the call to the oApp and manually open the tables in the load event I have no problem opening and closing the form.
>>
>>Any suggestions?
>>
>>TIA
>
>
>Through several layers of testing I came to the conclusion that you should not run the command SET DATASESSION TO lnDataSession from a method called by the load method of a form. I modified the base form class and added the OpenTable method, removed the datasession parameter and any datasession code. It works fine now, but I really dont understand why I could not do this from another object that was created n the main program. Hope this helps someone in the future.
>
>Bret
Bret,
Just my curiosity. What would happen if you used thisform.datasessionid instead of set("datasession") for lnDataSession ? Would you kindly test it for me ?
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform