locate methods for cursor

Sims, John (CDC/NCBDDD/DBDDD) (CTR) ayu8 at cdc.gov
Mon Jun 26 08:55:36 CDT 2006


> -----Original Message-----
> From: valentina-bounces at lists.macserve.net 
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of 
> Ruslan Zasukhin
> Sent: Wednesday, June 21, 2006 7:43 AM
> To: valentina at lists.macserve.net
> Subject: Re: Re[2]: locate methods for cursor
> 
> On 6/21/06 2:39 PM, "Ivan Smahin" 
> <ivan_smahin at valentina-db.com> wrote:
> 
> > How it should be solved in case of not-unique value in the field?
> > 
> > Probably it would be better to use FindValue() call and 
> work with Set 
> > of records?
> 
> But we talk about Vcursor.
> Set is used for Vtable.
> 
> May be Florian, it is enough FindForward?
> 
> As I have told -- very tricky feature....
> 
> --
> Best regards,
> 
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
> 

Hi all,

Sorry if I'm a little late to the dance.  I was on vacation.  The .Net
Datatable (similar in concept to a Vcursor) has a PrimaryKey property as
an array of DataColumns.  You can then execute a "Find" on the Datatable
by providing it with the value (or values if you have a multiple column
PrimaryKey) and it will return the Datarow of the row that matches.  As
in a database, the PrimaryKey column(s) must contain values that make
each row unique.  If you attempt to create a PrimaryKey that has
duplicate data, it will fail.  Perhaps you could do something similar
with the Vcursor.

Vcursor.PrimaryKey as Vfield()

Then Vcursor.Find(Value()) could set the Vcursor to the matching record
if found or EOF if not found.

Just my little input.

Take care,

-John


More information about the Valentina mailing list