What is the use of CommandBuilder?
CommandBuilder builds “Parameter” objects automatically.
Example:Dim pobjCommandBuilder As New OleDbCommandBuilder(pobjDataAdapter)
pobjCommandBuilder.DeriveParameters(pobjCommand)
If DeriveParameters method is used, an extra trip to the Datastore is madewhich can highly affect the efficiency.
What is the use of CommandBuilder?
CommandBuilder is used to build complex queries. It can even build commands that are based on the returned results. CommandBuilder is less error prone and more readable than the command object.