Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
3 tier, MTS, Ado, Oracle
Message
De
02/11/1998 13:13:33
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
3 tier, MTS, Ado, Oracle
Divers
Thread ID:
00153638
Message ID:
00153638
Vues:
63
Any insight would be greatly appreciated.

Our company is currently in the process of Moving to an Oracle Back end. I have been researching how to implement Vfp on the front end, Mts in the middle and Ado as the method of data access.

The goal has been to create a generic toolbar that will provide movement, searches, exit, Add, and Delete to any designated form. I have created all of the functionality except adding new records (which shouldn't be too much trouble). Another goal has been to create an easy method for the other developers to tie the data to the controls on the form such as text boxes, list boxes etc.

FoxPro does not provide any method of binding an Ado RecordSet to the controls as you would with native tables. In order to bind data to text boxes I create an object, add properties for each Ado Recordset field and bind that property to a text box controlsource.


Mts handles the data objects that contain the Sql statements to query the data as well as Oracle connection objects and querying objects, and the textbinding objects.

The problem I am having is that the text boxes refresh slowly. I believe the reason for this is that every text box needs to make a network call in order to get to an object property that is bound to the control source. This is because Mts moves the objects off the local users machine to another machine. I have found that when I remove Mts, recompile and run the components as local com dll's, the speed is very fast.


Here is an example of the way it works.

*the data class used with this form.
thisform.adorecordset = "employeeclass.employee"


Form Load Event
*get the ado recordset data for the form
thisform.adorecordset = createobject(thisform.adorecordset)

* create an object that will then create another object to hold the
* data of an ado RS.
boundclass = CREATEOBJECT("BoundComponentClass.BoundComObj")

* Bound Class Contains a property called boundData which is
* initialized as follows. This.BoundData = CREATEOBJECT("CUSTOM")

* Now I populate the object with the recordset data. The data is
* added to the boundData object as properties using the Addproperty
* Method. This is done by moving through the Recordset Field by field
* and adding each field name as a boundData property. The pointer to
* the boundData object is returned to the form

formBoundData = boundClass.RefreshData(thisform.adoRecordSet)

* now formBoundData can be bound to the controlsource of my text boxes
* I do this at design time by entering each required field as it is
* named on Oracle. Such as formBoundData.Emp_Code



The form loads and displays the data.

The objects I create with the createobject are either on Mts as a 3 tier architecture or on the client machine in a 2 tier design.


As I mentioned above, when the Objects are on Mts they instantiate quickly and load the data quickly, however the text boxes take awhile to refresh.

While the components are running on the client with out Mts the refresh rate is very fast.



Can anyone provide a faster method of getting the data to the controls ? Is anyone else using Mts in the middle tier and Ado for data access? I would be interested in hearing any comments or suggestions.

I am aware that on Mts Stateless objects are prefered. Most of the objects I have created are stateless with the exception of BoundComponentClass.BoundComObj.

Thank You,

Michael
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform