V4RB 1.1 Beginner's question

Ruslan Zasukhin sunshine at public.kherson.ua
Thu May 13 14:24:53 CDT 2004


On 5/13/04 1:58 PM, "olivier" <vidal_olivier at yahoo.fr> wrote:

Hi Oliver,

> Valentina (1.1) for realbasic (5.5)

Valentina 1.10 not 1.1

> Mac os X 3.3
> 
> Hello,
> 
> As I begin with Valentina, I am not sure that my cursor is good.
> I have a database with two tables:
> 
> Table ITEM
> 
> - Price1 vfloat
> -TaxPrice1_A vobjectptr (database.tax)
> -TaxPrice1_B vobjectptr (database.tax)
> 
> - Price2 vfloat
> -TaxPrice2_A vobjectptr (database.tax)
> -TaxPrice2_B vobjectptr (database.tax)
> 
> - Price3 vfloat
> -TaxPrice3_A vobjectptr (database.tax)
> -TaxPrice3_B vobjectptr (database.tax)
> 
> - Price4 vfloat
> -TaxPrice4_A vobjectptr (database.tax)
> -TaxPrice4_B vobjectptr (database.tax)
> 
> on the whole 16 prices, with each two different taxes !
> 
> many of the other fields are also in the table.
> 
> 
> Table TAX
> 
> -rate vfloat
> 
> to obtain all the data, cursor :
> 
> cur=new cursor(database, "SELECT I.Price1, t1a.rate, t1b.rate,
> I.Price2, t2a.rate, t2b.rate, I.Price3, t3a.rate, t3b.rate, I.Price4,
> t4a.rate, t4b.rate,
> ....... FROM item I, tax t1a, tax t1b, tax t2a, tax t2b,  tax t3a, tax
> t3b,  tax t4a, tax t4b....... WHERE I.TaxPrice1_A=t1a.recID and
> I.TaxPrice1_B=t1b.recID  and I.TaxPrice2_A=t2a.recID and
> I.TaxPrice2_B=t2B.recID and  I.TaxPrice3_A=t3a.recID and
> I.TaxPrice3_B=t3b.recID and  I.TaxPrice4_A=t4a.recID and
> I.TaxPrice4_B=t1b.recID.......)
> 
> As you imagine it, the result is not fast...
> 
> The cursor seems to me complicated. Is it the good solution ?

Really complex.

Why you not use simply

Table ITEM

    Price
    ptr1
    ptr2    
    
And split YOUR record into 16 small records?

Why you need show 16 (!) prices for single item?


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list