How to add Primary key in DataSet

Answer Posted / gopi

ds.Tables[0].Constraints.Add("pk_sid",
ds.Tables[0].Columns[0], true);

Is This Answer Correct ?    29 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we load multiple tables in a dataset?

533


What are the different methods by which we can populate a dataset?

678


Explain the difference in record set and dataset?

482


What is linq and entity framework?

510


What is ole in vb?

501






What connected data?

489


What is the difference in record set and dataset?

515


What are the advantage of ado.net?

513


What is ado asp?

507


How to check if the Dataset has records ?

528


What is ado.net architecture?

482


List all the steps in order, to access a database through ado.net?

576


What is command class in ado.net?

469


Explain About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data.

549


How do you find the count of records in a dataset?

473