Solved

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

Posted on 2004-10-08
4
209 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

791 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