Hi,
Try something like this.
dsClient.Tables(0).PrimaryKey = New DataColumn()
{dsClient.Tables(0).Columns("FirstName"),
dsClient.Tables(0).Columns("LastName")}
Ken
---------------------------
"gaffar" <Sa********@yahoo.co.in> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Sir Can you help the same code in the Vb.net
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:u6**************@TK2MSFTNGP14.phx.gbl...
Hi,
The datatable's primarykey accepts an array of datacolumns. Link
shows an example.
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemdatadatatableclassprimarykeytopic.asp
Ken
------------------------
"gaffar" <Sa********@yahoo.co.in> wrote in message
news:eX****************@TK2MSFTNGP15.phx.gbl...
Sir,
if we want to assign a primary key to a single cloumn. below code is
used.
objTable1.Keys.Append("PrimaryKey", KeyTypeEnum.adKeyPrimary,
"PrimaryKey_Field")
if i want to assign primary to more than one column then what will be
code.