Re: What's the better way to modify rows in a table? by Water
Water
Wed Aug 31 22:23:32 CDT 2005
Hmm! It turned out I grabbed the wrong end of my question. I am
re-reading my question and it sounds like I've asked, "to
CommandBuilder or not to CommandBuilder?".
Let me rephrase. What are the differences in the two methods, if any?
(1) Dim Com as SQLCommand("insert into Foo values(1, 'A dingo ate my
baby')")
Call Com.ExecuteNonQuery()
(2) Dim Adap as SQLDataAdapter
Adap.Fill(ds, "Foo")
Dim InsertCommand As SQLCommand = new SQLCommand("insert into Foo
values(@ID, @SomethingElse)")
Dim param As SQLParameter = New SQLParameter
....
.....
Adap.Update(ds, "Foo")