> Hey guys.
>
[quoted text clipped - 15 lines]
>
> Cesar
Thanks for reply, Ken.
I would like not use the Try Catch, because it seems be a bit slow (the
first time is called, at least).
I've changed everything to a ArrayList collection and stored others arrays
in each item of the arraylist (and concatened that two IDs into one string).
The performance now turn terrific faster, but I don't know if is the best
form yet.
[]s
Cesar
Hi,
When you add a primary key to a datatable you can specify more
than one column. If you use the 2 columns for the primary key you will get
an error when trying to add a duplicate row. Add the row in a try catch
block. If you get an error you are trying to add a duplicate.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemdatadatatableclassprimarykeytopic.asp
Ken
--------------------
> Hey guys.
>
[quoted text clipped - 15 lines]
>
> Cesar
Ken Tucker [MVP] - 30 Sep 2005 23:38 GMT
Hi,
I am glad you found a method that works for you. You could also use
the datatable's find method to check for the record instead of catching the
error.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vbcode/html/
vbtskcodeexamplesearchingrecordindatatable.asp
Ken
--------------------
> Thanks for reply, Ken.
>
[quoted text clipped - 41 lines]
>>
>> Cesar