Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Session object data
Message
 
To
21/06/1999 07:47:22
Kenneth Downs
Secure Data Software, Inc.
New York, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00231653
Message ID:
00232136
Views:
21
I thought the autoopentables would do it, but apparently not. I got it to work by calling DE.opentables after using addobject on the cursors. If you didn't use a DE, then you would use USE somewhere in session or cursor creation. I tried that to see if the DE added loading time because of its overhead and found it didn't matter if I used a DE, so I am using it to get the benefits of its properties and methods.

>Terry,
>
>I haven't used sessions much, but don't you need an explicit USE somewhere? If so, would it go in the Cursor INIT or the Datasession's INIT when it creates the cursor? Does AutoOpenTables do the trick if the tables are being defined on the fly?
>
>
>>Can anyone see why this code is not opening the table custs?
>>
>>local os, od, oc
>>os=create('ss')
>>os.od.oc.getdata
>>os=null
>>
>>define class ss as session
>> od=null
>> datasession = 2
>> function init
>> this.od=create('dd')
>> endfunc
>>enddefine
>>
>>define class dd as dataenvironment
>> autoopentables=.t.
>> function init
>> this.addobject('oc','cc')
>> with this.oc
>> .cursorsource="custs"
>> .database="test"
>> .order="lname"
>> .alias="custs"
>> endwith
>> endfunc
>>enddefine
>>
>>define class cc as cursor
>> function getdata
>> wait window 'Testing...'+custs.cust+':'+custs.lname
>> skip
>> wait window 'Testing...'+custs.cust+':'+custs.lname
>> endfunc
>>enddefine
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform