Update datasource without using DataAdapter

  • Thread starter Thread starter ang7
  • Start date Start date
A

ang7

Hi All,
I'm trying to find a way to update Dataset's datasource withtout using
DataAdapter, does there exist any methods?
Thanks!
 
Hi,

I suppose you are speaking about updating DataSet.
There is a manual way - loop through all tables/all changed rows and invoke
adjacen sql statament using command object.
After you've finished make sure you call AcceptChanges on DataSet.
BTW, this is exactly what dataadapter is doing withing Update method.
Why would you want use an alternative?

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

ang7 said:
Hi All,
I'm trying to find a way to update Dataset's datasource withtout using
DataAdapter, does there exist any methods?
Thanks!



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
There is nothing stopping you from visiting each row and executing your own
SQL--it's done all the time. A better approach, however would be to tune the
DataAdapter UpdateCommand,DeleteCommand and InsertCommand to execute your
own custom-written statements as others have suggested. See my article on
the CommandBuilder... it discusses these issues in depth.
http://www.betav.com/msdn_magazine.htm

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

ang7 said:
Hi All,
I'm trying to find a way to update Dataset's datasource withtout using
DataAdapter, does there exist any methods?
Thanks!



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
Back
Top