Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to add Primary key in DataSet

Answer Posted / kamalakannan.a

If we use c#

DataTable dt=new DataTable();

DataColumn Dc1 = new DataColumn("No", Type.GetType
("System.Int32"));

dt.Columns.Add(Dc1);

//Set Primary key
DataColumn[] dc = new DataColumn[1];
dc[0] = dt.Columns["No"];
dt.PrimaryKey = dc;

Kamal..

Is This Answer Correct ?    34 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the procedure to call a Stored Procedure of Back End in ADO (ActiveX Data Object) and RDO (Remote Data Objects)?

1036


What is the advantage of ado.net?

1002


What are different layers of ADO.Net?

1079


What is the significance of CommandBehavior.CloseConnection ?

1148


How do you merge 2 datasets into the third dataset in a simple manner?

980


What is the namespaces being used to access oracle database?

1057


What are the main differences between classic ado and ado.net?

1011


What are the different ado.net namespaces?

1045


What is the use of SqlCommand object?

1210


What is a string variable?

894


What is ado code?

935


What is oledb connection?

969


What are the different ado.net namespaces are available in .net?

998


What are the Features and disadvantages of dataset

1077


What are the benefits of using of ADO.NET in .NET 4.0?

1050