Hi,
Try something like this.
dsClient.Tables(0).PrimaryKey = New DataColumn()
{dsClient.Tables(0).Columns("FirstName"),
dsClient.Tables(0).Columns("LastName")}
Ken
---------------------------
"gaffar" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
Sir Can you help the same code in the Vb.net
"Ken Tucker [MVP]" <(E-Mail Removed)> wrote in message
news:u66cTg#(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:eX91wD%(E-Mail Removed)...
> 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.
>
>
>