Adapter with dynamic update statement by Rich
Rich
Sun Jun 20 00:53:40 CDT 2004
Well, just a shot in the dark, but how about if you
declare your sql DataAdapter like this:
...
Dim sqlDA As SqlDataAdapter = new SqlDataAdapter
sqlDA.SelectCommand = New SqlCommand("Select fld1, fld2,
fld3 From tbl1", conn)
Dim cmdBd As CommandBuilder = new CommandBuilder(sqlDA)
Say tbl1 contains 10 fields, your dataAdapter is only
connecting to 3 fields. I don't know if selecting fields
that are not triggered and then running an insert command
won't set off the triggers. But you could try this.
Rich
>-----Original Message-----
>
>
>The update that gets generated with adapters always
include all the
>columns. That means that with each record update, all the
columns get
>updated as well. This presents a bit of a problem as I
have some
>triggers going on changes on specific fields. Is there
way to instruct
>adapter to regenerate the update statement based on
changed columns
>only?
>
>TIA
>
>lc
>.
>