473,401 Members | 2,125 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,401 software developers and data experts.

Wht is the advantage of using SqlDataAdapter

Hi Guys

Why exactly one should use SqlDataAdapter?
Regards
Ashish
Nov 18 '05 #1
3 1801
Ashish wrote:
Why exactly one should use SqlDataAdapter?


To fill a DataTable (or DataSet which contains a DataTable).
And to apply the changes in a DataTable back to the data source.

Remember, the DataSet / DataTable are disconnected.
Whereas the SqlCommand / SqlDataReader are connected.

http://msdn.microsoft.com/library/en...ClassTopic.asp
- See the Remarks section.

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP

Hire top-notch developers at
http://www.able-consulting.com
Nov 18 '05 #2
Advantage is that it does not use OLE DB to transport the data back and
forth. It uses the SQL Server native protocol for that. So it is faster.
"Ashish" <as****@globsyn.co.in> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...
Hi Guys

Why exactly one should use SqlDataAdapter?
Regards
Ashish

Nov 18 '05 #3
> Why exactly one should use SqlDataAdapter?

One should use it only because it is needed for what one is doing.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Ashish" <as****@globsyn.co.in> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...
Hi Guys

Why exactly one should use SqlDataAdapter?
Regards
Ashish

Nov 18 '05 #4

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

Similar topics

2
by: RitaG | last post by:
Hi. Is it possible to run a Stored Procedure that takes 1 parameter using the SQLDataAdapter. I'm currently using the SQLCommand with the SQLDataReader to do this but would like to use a...
1
by: rkbnair | last post by:
In the below listed code, instead of using GetValue(2), is there any way to retrieve fields by calling the field name itself? (for example GetValue("str_mail_from") ?????) ...
6
by: goodstart123 | last post by:
For example, the following code works fine without SqlConnection. Any Answer to the question? string connectionString = "server=YourServer; uid=sa; pwd=YourPassword;...
3
by: W Akthar | last post by:
I am trying to use SqlDataAdapter to execute a Stored Procedure. The Stored Procedure is as follows CREATE Procedure SP_GetAddressesFromContactID @ID int AS SELECT b.StreetAddress1,
3
by: LP | last post by:
Hello, In the past I used SqlCommandBuilder and SqlDataAdapter .Update method to apply changes in a DataTable back to its table source in SQL Server. It worked fine when DataSet had only 1...
0
by: zhaoJian | last post by:
Here it is my code ,but it can't update the database.How to do it ? In _UpdateUnit event, I can not get the original value to @Original_UnitID,so I set a hidden column named LabelKey.But It...
0
by: dakvanslam | last post by:
I apologize if this is a simple question, but I am very new to SQL Server. I feel like I am missing something easy here. I an running VB ..NET from Visual Studio 2005 and SQL Server Express. The...
4
by: Matteo Migliore | last post by:
Hi. I writed a method that takes two DataTable with same schema and return a third DataTable that: - insert new rows from "compare" DataTable - delete rows contained in "source" and not in...
2
by: suganya | last post by:
Hi I have to bind the DropDownList box with ID field hidden using SQLDataAdapter. For that I have given the coding as protected void Page_Load(object sender, EventArgs e) { ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.