Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using DataEnvironment in Custom objects

Status
Not open for further replies.

jesylv

MIS
Jul 1, 2001
135
Hi everyone!

Is it possible to use a private dataenvironment with a custom object. I am trying to build a non-visual object that would be able to answer to specific data extraction requests from other objects. The use of a private dataSession would ensure that this object does not interfere with the dataSession of the calling form.

Jean
 
This is just the question I asked a couple of days ago. You might want to look at it.

thread184-158817 - Proper Base Class

The thing is that only forms, form sets and toolbars have private data sessions, though there's supposed to be a Session Class, which I haven't been able to locate in my system yet. It's possible that when I installed FVP 6 on this computer that I didn't install the service packs, however.

Dave Dardinger
 
HI Dave and Jean..

I am getting confused with the thread mentined and the discussions.. May be I am not putting effor to listen and undestand.. very unlike of me..hmmm

You can surely have private data scessions. Ofcourse you will be knowing this and so I dont talk about this. When a Private data scession form (can be modal) can be called from another form and then data manipulated in that... how does it interfere with that of called form.
To explain.. I have a formFind - in fact a class instatiated as a form with private data scession.. which can select a master record... add a master record on the fly.. and then return the selected code value only to the called form. To explain more.. An invoice form.. calling this for customer search... calling another instatiation for searching salesman code... same instatiation to search an item code.. etc etc.. There is no problem with this thinking..

The question is a question object which need not be a form.
Imagine again an object instatiated with different names. They can hold different variables values in their property.. which are specific to that object..
Example.. myObject Class instatiated as myObject1, myObject2.
myObject1.myProperty = "ABC"
myObject2.myProperty = "XYZ"

This data of these objects are independent (private data - if that sounds like communicating better).

Hope this helps :)







ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Hi Ramani,

Just a few words to better describe the issue at hands. When designing true 3-tier architecture application,you need to separate the User interface from the business objects (BO). What you need is a BO that is independent of User Interface so that it may be used in many different forms or reports. Since BO data is stored in a database (VFP, SQL, ORACLE....), you need a way to access this information using a Private Data Session.

One could build such an object using a form as a base class and set the property visible to .f. but this is not a solid solution since this form could be made visible.

What is needed here is a way to add a DataEnvironment to a custom based object and to add the business logic to this object.

ex:
Mybizobj1 = CREATEOBJECT("MyBizClass")
Mybizobj1.GetID(SomeId) && Locate appropriate record
?myBizObj1.GetName() && Prints the name of the current record

Mybizobj2 = CREATEOBJECT("MyBizClass")
Mybizobj2.GetID(SomeOtherId) && Locate appropriate record
?myBizObj2.GetName() && Prints the name of the second record


Jean
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top