api way
Jules Jacquot
jules.jacquot at wanadoo.fr
Sat Jul 23 09:04:42 CDT 2005
many thanks ruslan
best
jules
Le 23 juil. 05 à 08:48, Ruslan Zasukhin a écrit :
> On 7/23/05 8:28 AM, "Jules Jacquot" <jules.jacquot at wanadoo.fr> wrote:
>
>
>> hi, ruslan
>>
>> how can i rewrite this querry in api way ?
>>
>> dg=app.mdatabase.SQLSelect("select RecID,* from Article where BArt
>> like '"+ch+"%' and (JDepArt='C' and Ordart='"+Myord+"') order by
>> BArt")
>>
>
>
> bitset1 = tblAticle.field("BArt").FindLike( ch + "%" )
>
> bitset2 = tblAticle.field("JDepArt").FindValue( "C" )
> bitset3 = tblAticle.field("Ordart").FindValue( "Myord" )
>
> bitset23 = bitset2.intersect(bitset3)
>
> // release memory ASAP
> bitset2 = nil
> bitset3 = nil
>
> bitset123 = bitset1.intersect( bitset23 )
>
> // release memory ASAP
> bitset1 = nil
> bitset23 = nil
>
> arrasetRes = tblArticle.Sort( bitset123, "BArt" )
>
> bitset132 = nil
>
> Now you have ArraySet of selected fields.
>
> In the API way you do not use separate fields from SELECT.
> You always use just a Table.
>
> // for each selected recID
>
> foundRecs = arraysetRes.Count
>
> loop I = 1 to foundRecs
>
> RecId = arraysetRes.GetItemAt( I )
>
> tblArticle.RecID = RecID // these 2 lines can be as single
>
> ... Do something you need
>
> end loop
>
>
> --
> 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]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
>
L'homme vulgaire accuse les autres
Le sage n'accuse que lui-même
BOUDHA l'éveillé
More information about the Valentina
mailing list