468,505 Members | 1,790 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,505 developers. It's quick & easy.

How do I create a insert command that will take a datatable or datarow as a parameter

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
Sep 28 '06 #1
0 1243

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Karen Sullivan | last post: by
2 posts views Thread by Jacob | last post: by
6 posts views Thread by Stephan Steiner | last post: by
8 posts views Thread by Donald Xie | last post: by
5 posts views Thread by Klaus Jensen | last post: by
reply views Thread by NPC403 | last post: by
3 posts views Thread by gieforce | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.