473,387 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Any advantages?

Hi, should I use the data components like SqlDataSource/ObjectDataSource? Or
using coding by hands like below?

Page_Load:
ds = SqlHelper.ExecuteDataset(connectionString, CommandType.StoredProcedure,
"sp_eris_wilbor_pedido_consulta", arParms);
grd.DataSource = ds;
grd.DataBind();

Any pros/cons using one over other? What you suggest?

Thanks

VS 2005 asp.net 2.0 C#

Jun 27 '08 #1
2 819
"Paulo" <er********@terra.com.brwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
Hi, should I use the data components like SqlDataSource/ObjectDataSource?
Or using coding by hands like below?

Page_Load:
ds = SqlHelper.ExecuteDataset(connectionString,
CommandType.StoredProcedure, "sp_eris_wilbor_pedido_consulta", arParms);
grd.DataSource = ds;
grd.DataBind();

Any pros/cons using one over other? What you suggest?
It really comes down to personal preference.

I never go anywhere near the DataSource objects because I prefer to use my
own DAL.

For the same reason, I never use the Validation controls because I have my
own set of JavaScript validation routines which give me much more control...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #2
The data components like many included components are like training wheels
on a child's bicycle. They are helpful when first learning, but as soon as
you know the basics, then they only get in the way.

with hand-coding you get more control, plus when something goes wrong you
*can* fix it and don't have to deal with a broken black box that is the
pre-packaged component.

The Law of Leaky Abstractions
(http://www.joelonsoftware.com/articl...tractions.html) is relevant
to your question. Components abstract many details in an effort to help you,
but you need to understand the underlying realities once things go wrong.

-HTH

"Paulo" <er********@terra.com.brwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
Hi, should I use the data components like SqlDataSource/ObjectDataSource?
Or using coding by hands like below?

Page_Load:
ds = SqlHelper.ExecuteDataset(connectionString,
CommandType.StoredProcedure, "sp_eris_wilbor_pedido_consulta", arParms);
grd.DataSource = ds;
grd.DataBind();

Any pros/cons using one over other? What you suggest?

Thanks

VS 2005 asp.net 2.0 C#



Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: bissatch | last post by:
Hi, Generally if I re-use code, I use a function. If I need to use these functions over a number of pages I write the function to an include file where all pages have access. So when should I...
65
by: Anthony_Barker | last post by:
I have been reading a book about the evolution of the Basic programming language. The author states that Basic - particularly Microsoft's version is full of compromises which crept in along the...
17
by: Kamil Burzynski | last post by:
Hello. I have to create short (1 hour) presentation about C++ advantages over C. Are there any good articles/texts/etc. about such topic? Personally, I'm quite proficient at C++ myself (e.g....
2
by: Mark | last post by:
Hi all, a quick ADO.NET question in regards to the command object. What are the advantages (if any) of specifying command parameters when executing a stored procedure over just calling the stored...
1
by: Husam | last post by:
Hi EveryBody: I have research about advantages and disadvantages of C++ languages In one of my programming courses. Can Any one help me and told me about advantages and disadvantages of C++...
11
by: Bob Rosen | last post by:
I have used VB.NET for several months. Just recently I was asked to modify some web pages that were developed with C#. Although I know that C# is much more popular, in comparing the two all of...
1
by: vumani | last post by:
what is the advantages and disadvantages of Ms SQL server and java servletts front-end on the clien end. what is the advantages and disadvantages of Ms Access on the server, connected via JDBC and...
1
by: bantunks | last post by:
Hello, I am trying to figure out the advantages and disadvantages of exposing interfaces through Opaque data types in C. I have figured/found out the following two advantages 1. Higher level of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.