Using an INSERT Query as the value for the UpdateCommand property

G

Guest

I want to use an INSERT Query as the value for the UpdateCommand property of
an SQL datasource, anyone know if this will actually work ?

The reason i want to do it is bacause i am taking values from tablea and
binding them to controls, whose values i want to insert into tableb. I am
using a detailsview control to do the databinding. If the detailsview is in
edit mode then it displays the data from table A in the bound testbox
controls in the templatefield but obviously they are blank in insert mode.
However i want the textbox values to default to the values from table A when
they are to be inserted into table B. I thought the easiest way to do this
without having to programatically assign Test property of 30+ text boxes
everytime the detailsview changed into insert mode, was to use edit mode
instead but run an insert query rather than an update query. Will this work,
or is there a much better way of doing it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top