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

How can we add relation between tables in a dataset?

999


What does ado stand for in ado.net?

1096


What does executereader return?

972


What is sql command in ado net?

958


What is disconnected architecture in ado.net?

986


What is data view and variable view?

910


Why ca not we use multiple inheritance and garbage collector paralelly in .net?

1003


What you mean by filtering of data?

958


What is linq and entity framework?

1007


What is dao and ado?

924


Define atomicity?

1026


What is the difference in record set and dataset?

1027


How do you implement locking concept for dataset?

994


What does ado stand for?

908


What is the role of clr?

947