SqlDataSource TSQL vs Procs

D

David Lozzi

I'm fairly new to ASP.Net 2.0 SQLDatasource objects. It defaults using TSQL
statments for the SELECT, INSERT, UPDATE, DELETE commands, which is great
and it works. However, I've always been taught that all SQL work should be
completed by the SQL server, therefore use stored procedures even for the
simplest of select statements. Does this still hold true for sqldatasources?
Should I use procs instead of the default tsql??

Thanks,

David Lozzi
 
S

sloan

Whether or not you use
TSQL or "inline" sql, I would suggest you create a datalayer.

The SqlDataSource is NOT a datalayer.


The base argument is really:

Rapid Code Development VS Good Code Development.

Unless I'm whipping up a demo that needs to be done by yesterday,
I would avoid tags (of which SqlDataSource is one ) 99.9% of the time.

Rapid <> Good most of the time.

Good development means it is maintainable (among other things), and the
<tags> approach is cumbersome in that regard.


See
6/5/2006
Custom Objects and Tiered Development II // 2.0
http://sholliday.spaces.live.com/blog/

for what a datalayer object is ( among many others sites out there )
 
M

Mark Rae

Rapid Code Development VS Good Code Development.

Unless I'm whipping up a demo that needs to be done by yesterday,
I would avoid tags (of which SqlDataSource is one ) 99.9% of the time.

Rapid <> Good most of the time.

I couldn't agree more!

In fact, once I've added my DAL to a new project, it's actually quicker and
easier to use that rather than any of the new data objects...
 
S

sloan

Yeah, once you get used to doing good DataLayer objects, its at least as
fast or not faster than the gui/wizards.

And for maintenance, you can't ever compare.

SqlDataSource ........ youch, its the most non maintable thing I've ever
seen.
 
M

Mark Rae

SqlDataSource ........ youch, its the most non maintable thing I've ever
seen.

LOL! When I first saw it back in the beta days, my first thought was the
Microsoft was trying to woo FrontPage users... :)
 
D

David Lozzi

THANK YOU THANK YOU THANK YOU

I've been wondering about this for a long time and finally decided to ask.
I'm glad to see your converstations back and forth, I agree with you. I just
finished a project using DAL and decided to try to use the quick and easy
sqldatasource object.... and I'm glad I asked now, i'm only 3 pages into a
40 hour project, i'm sticking with my DAL.

THANKS AGAIN!!!

David Lozzi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top