What is datacolumn and how it is used?

Answer Posted / kamalakannan.a

DataColumn is used to create the column of the particular
datatable.

DataTable dt=new DataTable();
DataColumn dcExample=new DataColumn("Name",Type.GetType
("System.String);

dt.Columns.Add(dcExample);

dt.Acceptchanges();

Kamal...

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain how to enable and disable connection pooling?

506


Is it possible to edit data in Repeater control?

533


What are the differences between OLEDB and SQLClient Providers?

564


What are the advantages and drawbacks of using ado.net?

624


How do you update a dataset in ado.net?

551






Explain what are acid properties?

542


Which property is used to check whether a DataReader is closed or opened?

570


What is the provider being used to access oracle database?

503


What is acid in ado.net?

533


What is ado circle?

665


What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?

775


What is the difference between sqldatareader and sqldataadapter?

494


Which is faster entity framework or ado.net?

501


What does executereader return?

527


What is the role of clr?

531