Joel this work fine with insertcommand and updatecommand as long you open the connection prior to using the dataadapter, remember that the dataadapter will open and close the the connection in case it wasn't open at prior.
Now this will work for fields missing on the insert/update command, will not work if you put a null value on that field, or fiel.ds that you didn't set the value.
What I do in that case is that I have a method that goes over each row and col and sets default values or blank ones in case no default value exist.
>Alex,
>
>Does this work for commands that become InsertCommands or UpdateCommands? I can get the SET commands to stick when I just do straight SQL statements (like running an INSERT command directly through the CommandText of a SelectCommand).
>
>But when I fill a DataTable and then set the InsertCommand of the data adapter, NULL values trigger an error when the Update method tries to insert a new record...
>
>Do you use your Command objects with the Update method and have it work?
>
>Thanks,
>JoeK
Alexandre Palma
Senior Application Architect