dim cmb as new SQLCommand Builder(da) I hope this helps, Cor "Rich" I think I figured this out (because I finally got it to work). This is not a guarantee of course that there cannot be something wrong. All the insert, update and delete handling for a table are made dynamicly while using the dataadapter after doing this command. Command Text = "Update tbl1 set fld1 = @p1 where ID [email protected]" da. I have never seen in this newsgroups or by myself a real wrong behaviour of the commandbuilder.

Add(New Sql Parameter("@p1, Sql DBtype.varchar, 10, "fld1") Dim dr As Data Row = tblx. Update(tblx) '--now I can see the update in tblx/tbl1 the example using cmd was only updating tbl1 on the sql server. Update(tblx) '--tblx/tbl1 not getting updated here. But if I do this---then it works OK (not using data Adapter though) Dim cmd As New Sql Command cmd.

Command Text = "Update tbl1 set fld1 = 'test' where ID = 1" conn. Dim da As New Sql Data Adapter("Select * from tbl1", conn) dim tblx As New Data Table da.

Add(New Sql Parameter("@p1, Sql DBtype.varchar, 10, "fld1") Dim dr As Data Row = tblx. Update(tblx) '--now I can see the update in tblx/tbl1 the example using cmd was only updating tbl1 on the sql server. Update(tblx) '--tblx/tbl1 not getting updated here. But if I do this---then it works OK (not using data Adapter though) Dim cmd As New Sql Command cmd. May I ask what the Select statement in the Update Command performs? Add(New Sql Parameter("@Original_What Ever", _ Sql Db Type. Input, False, nb, nb, _ "What Ever", Data Row Version.

Command Text = "Update tbl1 set fld1 = 'test' where ID = 1" da. Dim da As New Sql Data Adapter("Select * from tbl1", conn) dim tblx As New Data Table da. Command Text = "UPDATE Sample SET What Ever = @What Ever WHERE (Auto Id = @Original_Auto Id) AND (What Ever = @Original_What Ever OR @Original_What Ever IS NULL AND What Ever IS NULL); " & _ "SELECT Auto Id, What Ever FROM Sample WHERE (Auto Id = @Auto Id)" I use a Select statement in the Insert Command in order to retrieve @@Identity from a sql table.

dim cmb as new SQLCommand Builder(da) I hope this helps, Cor "Rich" I think I figured this out (because I finally got it to work). This is not a guarantee of course that there cannot be something wrong. dim cmb as new SQLCommand Builder(da) I hope this helps, Cor "Rich" Rich, In SQLClient with autokey the key is changed in the Dataset, what is not done by Ole Db.

All the insert, update and delete handling for a table are made dynamicly while using the dataadapter after doing this command. Command Text = "Update tbl1 set fld1 = @p1 where ID [email protected]" da. I have never seen in this newsgroups or by myself a real wrong behaviour of the commandbuilder. All the insert, update and delete handling for a table are made dynamicly while using the dataadapter after doing this command.

Dim da As New Sql Data Adapter("Select * from tbl1", conn) dim tblx As New Data Table da.

Update(tblx) '--tblx/tbl1 not getting updated here. But if I do this---then it works OK (not using data Adapter though) Dim cmd As New Sql Command cmd.

Add(New Sql Parameter("@p1, Sql DBtype.varchar, 10, "fld1") Dim dr As Data Row = tblx. Update(tblx) '--now I can see the update in tblx/tbl1 the example using cmd was only updating tbl1 on the sql server. Update(tblx) '--tblx/tbl1 not getting updated here. But if I do this---then it works OK (not using data Adapter though) Dim cmd As New Sql Command cmd. It does the same with the delete and the insert by the way. Command Text = "UPDATE Sample SET What Ever = @What Ever WHERE (Auto Id = @Original_Auto Id) " & _ "AND (What Ever = @Original_What Ever OR @Original_What Ever IS NULL AND What Ever IS NULL); " & _ "SELECT Auto Id, What Ever FROM Sample WHERE (Auto Id = @Auto Id)" cmd Update. May I ask what the Select statement in the Update Command performs? Add(New Sql Parameter("@Original_What Ever", _ Sql Db Type. Input, False, nb, nb, _ "What Ever", Data Row Version.