locate methods for cursor

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Jun 27 23:08:18 CDT 2006


On 6/27/06 9:50 PM, "Sims, John (CDC/NCBDDD/DBDDD) (CTR)" <ayu8 at cdc.gov>
wrote:

>  
>>>> To clarify. So steps are next?
>>>> 
>>>>     curs = db.SqlSelect( "select f1, f2, f3, FROM T1 ..." )
>>>> 
>>>>     curs.PrimaryKey = f2    // f2 must have unique values...
>>>> 
>>>>     curs.Find( v2 )  // move cursor to record that have in
>> f2 value 
>>>> v2.
>>>>         
>>>> 
>>>> Right ?
>>>> 
>>>> 
>>>> --
>>>> Best regards,
>>>> 
>>>> Ruslan Zasukhin
>>>> VP Engineering and New Technology
>>>> Paradigma Software, Inc
>>> 
>>> Hi Ruslan,
>>> 
>>> Yes, that is very much how the .NET Datatable works.  The
>> only thing I 
>>> would point out is that the .NET Datatable allows you to
>> use multiple 
>>> column PrimaryKey by making PrimaryKey an array of
>> Datacolumns.  Using
>>> your example, it might look more like this.
>>> 
>>> Dim pk() as Vfield
>>> 
>>> curs = db.SqlSelect( "select f1, f2, f3, FROM T1 ..." )
>>> 
>>> Pk.append(f2)
>>>  
>>> curs.PrimaryKey = pk    // f2 must have unique values...
>>> 
>>> Dim vals() as string
>>> 
>>> Vals.append(v2)
>>> 
>>> curs.Find( Vals )  // move cursor to record that have in f2
>> value v2.
>> 
>> I see, but note that we not support multi-column PKs even for Tables.
>> 
>> 
>> --
>> Best regards,
>> 
>> Ruslan Zasukhin
>> VP Engineering and New Technology
>> Paradigma Software, Inc
>> 
> 
> Right.  In .NET, the "Primary Key" you define for the Datatable is not
> necessarily the PK for the table.  The Datatable.PrimaryKey is defined
> by the developer to enable searchability.  The Datatable may contain
> data from several joined tables.  As long as the developer knows that a
> certain column or set of columns will be unique, he/she can define them
> as the Datatable.PrimaryKey so that they can locate records in the
> Datatable more easiliy.
> 
> Does that make sense?

Florian,

In your task do you have such Unique fields in the cursor ?


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list