Solved

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

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now