PDA

Click to See Complete Forum and Search --> : Bound vs Unbound on Remote Connection to SQL Server


RIVES
Sep 22nd, 2000, 01:42 PM
Just an insight...open for suggestions.

Coding in vb made it sure a lot easy for new programmers especially in database development. I sometimes think that its style is "spoon feeding". Anyways, the default and the usual way that they do it is that controls such as datagrid are bound to the database. Sure this is fine with the desktop applications that uses such desktop db such as Access or SQL anywhere. The problem now arises when it is done using remote servers such as High Ends Oracle and Informix and not so high end MS and Sybase SQL Server and the likes... I have seen a lot of applications that do this. Even MS do it.

Using bound data controls(less code) would automatically update the recordset which is bound to a table. So that each row that you change, it automatically sends packets through the connection and then updates the database table. In unbound ( a lot of codes ), you wait until the user presses Save button before you use the connection then update the database.

Also, when using these RDBMS(Oracle, SQL Server) it is better to use stored procedures and just let the server do as much as possible, all the work. Especially when you have a lot of data processing.

Ok. So which is better? Please give insights. This way, we could help those programmers who are very dependent on the perks of VB...I still think that looking into what these data bound controls would make you a better programmer.

Have anyone used PowerBuilder before? It is a programming language that focuses on database application development. They have the so called datawindows, which is their bread and butter. Well, that is what I am looking for in VB. You retrieve a lot of rows and then edit, edit, insert, delete, edit, insert...and so on and then when you are done, you call dw_data.Update(). Wouldn't it be great for VB to have this? I sure do hope that they still have time for it for the VB 7.

sanon
Sep 22nd, 2000, 03:35 PM
Hi Rives,

You wrote such a long story and, finally, you asked which one better? Well, what is "which one"?...:P Sorry to my poor English. However, I guess you asked about bound and unbound method, right? If so, I think it depends on what kinds of softwares you want. Some small businesses that have a small database, such as Access, and stand alone application, it's fine to use bounded connection because you don't have to concern about blocking other users to use the database. On the other hand, in the enterprise scale, this become an issue because you have to concern not only multiple users, but also networking traffic. Obviously, we should use unbounded connection. Moreover, VB gives us an easy tool to achive that. Well, some people may argue it's not that easy...but, well, it's not too hard as well..:P Anyway, in my projects, I use ADO and it works well. Yes, you're right that using data control or some sort of data controls is easy, but I don't recommend to use those because it's not flexible in big scale softwares.

I've never used PowerBuilder and not so sure how it look like, but your sound like recordset properties in VB. Once, you retrive data from the database and play around with it. When you finish, just use rs.update...that's it!! Is this what you want? If so, VB has this feature, I believe, since VB4.