Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
3 tier, MTS, Ado, Oracle
Message
De
02/11/1998 20:13:34
 
 
À
02/11/1998 13:13:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00153638
Message ID:
00153766
Vues:
22
>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.
>

There is a utility that converts an ADO recordset to a DBF/Cursor. You can get it from Ken Levys web site at www.classx.com

>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.
>

Send you query to the middle tier... have the middle tier pass back an ADO record set... Convert the RS to a VFP cursor. Do not go to the back end unless the user saves or refreshes.

On a save, create the single modified record to an ADO record set and send it to the middle tier for validation / saving.

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

I think all the record sets should be created on the middle tier and passed to the front end. Collect paramaters in the front end and send them to the middle tier as a string or create a paramater object in which you addobject the paramamters and put the values in them, then pass this object to the middle tier.

>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.
>

Big difference here. If they are in MTS you want to design them to be as stateless as possible. If you are just creating a modifyable business rule .dll, you don't have to worry about it, since it will most likley be used by only one user.

>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.
>

Yep... you shouldn't be sending the data across the wire unless you need to save a modification or query data. As I said above... send a query, then navigate through the records in the UI... when you need to save or refresh or requery, only then do you go back over the wire.

If you have small validation sets, you can bring that data across too, so you can do client side validations. We are looking into this... small validation sets come across initially, where as large validation sets are not pulled across unless needed.


>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.
>

See above. <g>

>Thank You,
>
>Michael

Sounds like you have or will conquer some things that we are doing on our project too. Lets keep in touch.

BOb
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform