how does SqlCommandBuilder work?

  • Thread starter Thread starter Andy Fish
  • Start date Start date
A

Andy Fish

hi,

I have seen by example that in order to use an SqlCommandBuilder, you just
have to instantiate it.

however, when trying to figure out what was happening, I looked in
reflector, and I can see that the SqlCommandBuilder constructor doesn't
actually do anything except store a reference to the DataAdapter. it does
not invoke the data adapter in any way.

how does this work? - I'm baffled !!!

Andy
 
The link "hooks" the Update method of the DataAdapter. When it's called the
CommandBuilder kicks in and does it's (black) magic the best it can.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
 
I assumed it was doing something like that, but when I look in the code with
reflector, it doesn't access the DataAdapter at all in the constructon
 
Back
Top