newbie question: gridview, how to automatically update all fields

M

Mark

Newbie question, but I can't find anything either here or at ms that shows
the answer. I want to update the database by allowing the user to make
changes via gridview. I was wondering if there was an easier way to write
the UPDATE command than having to individually spell out each and every
field name.

right now I have:

UpdateCommand="Update RefInfo SET
field1=@field1,
field2=@field2,
field3=@field3,
field4=@field4,
field5=@field5,
field6=@field6,
WHERE ServerType=@ServerType">

I have 27 fields in my table, isn't there a "update everything" type of
command rather than having to spellout each individual field name and then
if I add/change a field, to manually change it?

Mark
 
M

Manish

Hi Mark,

I think you can use any of the DataSource control like SQLDataSource and go
to advance options and it will automatically generate a Update, delete
command for you.

Regards,
Manish
www.ComponentOne.com
 

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,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top