First question:
Yes, you will have less perf with four data adapters. It is a classic
trade-off: maintainability (drag and drop - ability in this case) versus
performance. You will probably not experience enough perf loss to be a real
concern, however.
A way around this is to create a single sproc that returns all of your data
in the form of four select statements. The downside is you will have to hand
code the update logic, if the data can be manipulated in your form.
Second question:
Strongly typed DataSets perform better, as all of the data is of the correct
type. They are not as forgiving (a con?) and require you to use explicit
coding techniques (I do not personally see this as a con). Because of this,
you should test thoroughly (but, then, you should always be thorough in
testing); if you do not, things WILL blow up on you.
One great benefit of strongly typed DataSets is the dotted notation. The
ability to pull values from a row without thought (the first row in this
instance) is wonderful:
int MemberID = MemberData.Memb er[0].MemberID;
The biggest beef with developers I have come in contact with is you cannot
be as sloppy with Strongly Typed DataSets as you can with the standard drag
and drop in Visual Studio .NET. I do not see this as a down side. Your
mileage may vary.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************** ************
Think Outside the Box!
*************** ************
"JJ" wrote:
Hi All,
On my webform in ASP.net I have dragged 4 SqlDataAdapters and have dropped
them to webform. I was wondering what is the norm for how many
SqlDataAdapters should be used in a webform? Is it better to code behind the
SqlDataAdapters instead of using the data controls on the webform generate it
for me? Will I experience a performance hit for using 4 SqlDataAdapters ?
Also what is the pros and cons to using a Strong Typed Dataset over a
generic one in code behind?
Thanks,
JJ