PDA

Click to See Complete Forum and Search --> : Advantage and Disadvantage for binding mechanism


Smallkeung
Sep 28th, 2000, 12:54 AM
If I want to develop a Client/Server application with VB and SQL server, what are the advantages and the disadvantages for using data binding mechanism? For my mind, I think that using Data binding will reduce code but I don't like it directly access the Database. Could any VB expert gives some their opinions on it?

I'm also considering the cursor Location. After I read serval books, I feel confuse to locate the cursor in client or server side. Actually I think that locating the cursor in server is better. Coz, I'm writing the client/server application, it can dynamically update the recordset. However after using the Server side location. Many functions are eliminated, such as recordcount. What is the best way to locate the cursor?

Thanks a lot.

Regards,
Lawrence

simonm
Sep 28th, 2000, 05:16 AM
We had a similar discussion in our company lately regarding the best data access approach to take for a new system we were about to develop.

I should say at this point that we haven't finished the system yet so we can't be sure that the approach we've taken is ideal.

One problem with data binding is that you have a persistant connection to the datasource which could make your application not very scalable (100's of persistant connections to the server could slow it right down).

You could use disconnected recordsets that you bind your controls to and only sync with your data source when you actually need to (to refresh or update). For this you need to have a client side cursor and use the synchronisation service provided by the cursor engine.

You could use stored procedures (what we've done) to update and retrieve your data and then populate your data manually. Obviously this makes a lot more code but you can channel all data access through these stored procedures and you only need your validation in one place (even if you access your data from elsewhere, like the web).

If you use a persistant connection via recordsets then use a client side cursor either if you want the additional functionality it provides or if you want to shift some of the burden from the data source onto the clients.

Hope this helps a little.

Simon.

Smallkeung
Sep 28th, 2000, 09:21 AM
Acutally, I think that using Data Binding Technique is only suitable for a small system or lazy programmer. Thanks for your comments. Your comments make me more confident to continue my system. :)

Thanks a Lot...
smallkeung