yes. i think so. But if declared as 3, there is error saying expecting 3
values but receiving 4... error something like that
"Prasad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> The Array should be declared with length 3 and not 2.
>
> HTH
> Prasad
>
> "Calvin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Private Sub FindInMultiPKey(ByVal myTable As DataTable)
> > Dim foundRow As DataRow
> > ' Create an array for the key values to find.
> > Dim findTheseVals(2) As Object
> > ' Set the values of the keys to find.
> > findTheseVals(0) = "John"
> > findTheseVals(1) = "Smith"
> > findTheseVals(2) = "5 Main St."
> > foundRow = myTable.Rows.Find(findTheseVals)
> > ' Display column 1 of the found row.
> > If Not (foundRow Is Nothing) Then
> > Console.WriteLine(foundRow(1).ToString())
> > End If
> > End Sub
> >
> > I find the example in msdn. I wonder why the array findTheseVals
declared
> > dimension as 2 instead of 3. There are 3 key elements but the size of
the
> > array is only 2??
> >
> >
>
>
|