Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding free table to form DE at runtime
Message
From
22/02/2011 11:17:31
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01501164
Message ID:
01501276
Views:
36
>>>May I ask why you want to do this? Experience has taught me to avoid using the DE, I prefer to leave it empty.
>>
>>Why is that ? DE is perfectly safe to use, provided you handle bug with hardcoded database paths.
>>Of course, from architecture standpoint it is much better to keep DE empty (tables open before form is even started), but if need be DE can be used without any problems.
>>
>>For Soykan; Why don't you simply open free table you need in load event ? You can close it afterwards manually as well
>>before you close form.
>>
>>
>>
>>
>>
>>>
>>>>Hi All,
>>>>i need to add a free table to form DE at run time (load event ) event and remove it at destroy event
>>>>
>>>>yes you may ask you can load it at load event instead of add to DE but this is a special issue and
>>>>working from DE so ;
>>>>
>>>>i have tried to add a free table to DE at run time like below but unsuccessful :(
>>>>
>>>>how would be your suggestions ?
>>>>TIA
>>>>
>>>>
>>>>this.Dataenvironment.addObject('MyCursor','Cursor')
>>>>this.Dataenvironment.MyCursor.cursorsource='mytable'
>>>>this.Dataenvironment.MyCursor.alias='mytable'
>>>>
>
>I agree with you Srdjan DE is safe place to open tables and visual , i couldn't use a table at my class i thought to add it DE so that i asked this question...

Well it is safe in general, but in this particular case opening table directly might be perhaps more practical.

Like Tore, I do NOT advice using DE, all I said that DE _can_ be used safely if need be.
95% of my forms do not use DE, but there are small numbers of forms that do, and do it for a good reason (of having Private DS)
It can be very well other way around, but that is matter of prefered design/architecture.

HTH
Sergio
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform