update dataset column

I can loop through dataset and get columnname. How can I update columns name? Sample column1 Named acct in dataset and I want to change it to Account.
VBdotnet2005Asked:
Who is Participating?
 
Rahul AgarwalConnect With a Mentor Team LeaderCommented:
Try this code:

ds.Tables[0].Columns[0].ColumnName = "somecolumnname";
0
 
DhaestCommented:
A remark - If you fill the dataset from the database and you change the columnname like agarwalrahul mentioned, the name of the column is not changed in the database !

If you really want this to happen, you'll need to send a ddl-statement (alter table ...)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.