Hello,
How dynamaically add columns to sql datatable ?Columns counts may be different.it is not defined.
Thanks in advance.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ashish ShuklaPosted Mar 24, 2013, 6:39 AM
dt.Columns.Add("TestColumn",typeof(string));
dt refers to an existing datatable.
To set the value we can use dr["TestColumn"] ="Turan"
Plese let me know if this answers your question