Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Which is better Make multi Connect Or One ?

Author  Topic 

ya3mro
Starting Member

37 Posts

Posted - 2006-09-19 : 13:58:15
Dear C# Developers ,


if i wanto to get about 4 tables from SQL server Database Table

which is better and why in implementing in C# ?

• Open connection once and call a stored procedure that return DataSet with All tables
OR
• for each table i open a connection and go to DB and get each table in a time (( mean go to DB four time ))

-- most say make them in one step is better ??
but why and how is i need to make them as four calls as its better for my Applicatoin architecture ..

PLZ any one can help me with articles , exaples

thanx for ur interest

How I Came To Islam?
http://english.islamway.com

ya3mro
Starting Member

37 Posts

Posted - 2006-09-19 : 14:10:38
Waiting for ur Replies necessary ?

How I Came To Islam?
http://english.islamway.com
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2006-09-19 : 14:26:23
Sometimes taking many small bites is better than taking one big bite.
Sometimes the reverse is true.

Patience is a virtue.
Google is your friend.

Sometimes datasets are like shooting mice with elephant guns.

rockmoose
Go to Top of Page

ya3mro
Starting Member

37 Posts

Posted - 2006-09-19 : 19:25:31
thanx
but ur reply is so brief, in which i nedd more details about this topic

How I Came To Islam?
http://english.islamway.com
Go to Top of Page

ya3mro
Starting Member

37 Posts

Posted - 2006-09-20 : 07:30:47
plz , i want a reply for my question ??

or Tell me where i can find an answer to my Question

thanx

How I Came To Islam?
http://english.islamway.com
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2006-09-20 : 08:02:09
You will not find a concrete answer to your question.

From my (very subjective) standpoint, working with complex datasets that are populated in one large fetch from the database,
will lead to a loss of modularity in the application. And less flexibility and harder maintenance in the long run.


Here is a broad link describing bvest practices
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/adonetbest.asp
Here is a link describing alternatives to datasets
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/CustEntCls.asp

rockmoose
Go to Top of Page
   

- Advertisement -