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
Explain which name space is used to get assembly details?
how we can fire event in databound coulm in datagfrid withot using button?
What is the procedure to call a Stored Procedure of Back End in ADO (ActiveX Data Object) and RDO (Remote Data Objects)?
Explain the namespaces in which .net has the data functionality class.
How would you connect to a database by using .NET?
What is the difference between SqlCommand and SqlCommandBuilder?
What is the difference between ADO and ADO.Net?
Explain executenonquery?
How can we perform transactions in .net?
How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?
What is microsoft ole db provider for sql server?
Explain the difference in an abstract class and an interface?
Explain the advantage of ADO.Net?
Which is the feature of ado.net?
What are two types of transaction supported by ado.net?