Solved

To data bind or not to data bind that is the question.

Posted on 2004-10-08
4
207 Views
Last Modified: 2010-05-02
I'm begining to construct an N-Tier applicatoin. I have a data layer object forwarding a recordset to a business layer. The business layer has the DataSource behaviour set to vb datasoure. I use a grid to bind the return of multiple records in the recordset though I don't allow any editing in the grid. I do my Add, Editing, Deleteing in a serperate single record Form thats supplied with its own bussiness object. My question is should I do the updating with the single record using data binding (using a single record recordset) or should I use a stored procedure and pass paramerters. I have heard that databinding can be more trouble than its worth.  Thanks.
0
Comment
Question by:Arundel_Castle
  • 2
4 Comments
 
LVL 7

Assisted Solution

by:HoweverComma
HoweverComma earned 200 total points
ID: 12264298
I prefer using a stored procedure as it allows YOU to control what and how it happens along with anything that you would like to happen additionally.
In a situation that sounds similar to yours I needed to record for auditing purposes who did the action as well as save the record to a tracking database, to aid in rolling back any changes made in error.

This will also give you complete control over the associations and interaction between the layers, as well as enhancing the ease of portability.

Now you can still accomplish most of that with Databinding by events, when you get through you are basically going to have the same code that you would have in stored procedures anyway.

0
 
LVL 3

Expert Comment

by:Noel_Castillo
ID: 12274476
If you have enough time then its better to create your stored procedure rather than databinding. Databinding can save your precious programming time but doesnt give full control on how it should be done. There are some instances that programmers find themselves helpless of some problems because of shortcuts and bundled functions. :)
0
 
LVL 3

Author Comment

by:Arundel_Castle
ID: 12299901
Do either of you have any good links on not using data bindings. Some examples would be good. I'm going to close this question shortly, if its ok with both of you I will split the points.
0
 
LVL 3

Accepted Solution

by:
Noel_Castillo earned 300 total points
ID: 12304374
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question