Article ID: 310367 - View products that this article applies to.
This article was previously published under Q310367
This article refers to the following Microsoft .NET Framework Class Library namespaces:
If you use the CommandBuilder object to explicitly get commands for the DataAdapter object as follows:
and then run the following Visual Basic .NET code
or the following Visual C# .NET code
the commands that you add to the DataAdapter are deleted, and you receive the following error message:
An unhandled exception of type 'System.NullReferenceException' occurred in app_name.exe
Additional information: Object reference not set to an instance of an object.
CommandBuilder deletes the commands that it generates when it is disassociated from a DataAdapter. CommandBuilder and DataAdapter are linked; when they are unlinked or disassociated, the commands are nulled. This problem does not affect commands that you build from the beginning (from scratch).
Use one of the following methods to resolve this problem:
Steps to Reproduce the Behavior
Article ID: 310367 - Last Review: December 11, 2006 - Revision: 2.12
Contact us for more help