How to add Primary key in DataSet

Answer Posted / shahil singh

dim col() as new dt.datacolumn
col(0)=dt.column(1)
dt.primarykey=col

Is This Answer Correct ?    30 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default timeout specified for "sqlcommand.commandtimeout" property?

551


how you will deal result set? How do you sort a dataset?If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?

591


What are the different methods available under the sqlcommand class to access the data?

586


How we can provide data to ado.net?

551


What are the advantages of oledb compared with other classes?

2331






How do you connect to sql server database without using sqlclient?

568


Does executenonquery return a value?

548


Which namespaces are used for data access?

628


What is read only and forward only in ado.net?

523


How do you update database through dataset?

544


How will you differentiate between ADO (ActiveX Data Object) and RDO (Remote Data Objects)?

591


Explain the basic use of "dataview" and explain its methods.

542


What is data view and variable view?

493


What is the default provider in ado.net?

520


What is the difference between Command and CommandBuilder object?

604