Wht is the advantage of using SqlDataAdapter

K

Kevin Spencer

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.
 
C

Carl Prothman [MVP]

Ashish said:
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/e...stemDataSqlClientSqlDataAdapterClassTopic.asp
- See the Remarks section.

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP

Hire top-notch developers at
http://www.able-consulting.com
 
N

Naveen K Kohli

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.
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top