Wht is the advantage of using SqlDataAdapter

  • Thread starter Thread starter Ashish
  • Start date Start date
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 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
 
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.
 
Back
Top