R
Rob Dob
How do I create a insert command that will take a datatable or datarow as a
parameter instead of me having to supply it with parameters for each field
value. I heard something about using the v2.0 SqlHelper class (MS Data
Application Block), however I don't have a clue how to use this and
wondering if using it would be more work then entering in the 50 fields. Am
I better off just modifying the insert command that was created
automatically at the time I created the tableadapter? if so does that mean
that if I reconfigure the table adapter then I will have to remodify the
insert command. The reason for me doing all this is that I have one
identity field within the select statement of my table adapter and when I
try and do an insert it fails with an error so therefore I will need to
remove the identity field from the insert command, but I would still like
the value returned to me in the select command.
any help or suggestions come very welcomed,
thanks
parameter instead of me having to supply it with parameters for each field
value. I heard something about using the v2.0 SqlHelper class (MS Data
Application Block), however I don't have a clue how to use this and
wondering if using it would be more work then entering in the 50 fields. Am
I better off just modifying the insert command that was created
automatically at the time I created the tableadapter? if so does that mean
that if I reconfigure the table adapter then I will have to remodify the
insert command. The reason for me doing all this is that I have one
identity field within the select statement of my table adapter and when I
try and do an insert it fails with an error so therefore I will need to
remove the identity field from the insert command, but I would still like
the value returned to me in the select command.
any help or suggestions come very welcomed,
thanks