[V4MD] Max aggregate function in director

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Aug 25 08:41:58 CDT 2004


On 8/25/04 2:26 AM, "Daniel Crowder" <daniel at monumental-i.com> wrote:

Hi Daniel,

1) yes, I have open your database in VAPP, and in the table product
    I see regular field "id".

    But it is NOT BaseObject method.
    this means something wrong in the code of field creation.

Let's look.

     addField(pdb.db, product_ref, "id", #kTypeUlong, "RecID")

Mistake Daniel.
In docs is said that

    AddField object me,
        integer boRef,string fldName,symbol fldType,
        [integer Param1], [integer Param2],[integer Method]


You have miss Param1 and Param2.
We use this parameters for e.g. String field.
Numeric fields simply ignore them.
So you need

     addField(pdb.db, product_ref, "id", #kTypeUlong, 0, 0, "RecID")


2) Link to Valentina Studio you can find on our home page.
    yes Valentina Studio work on both MAC and PC


3) BTW, please remind me, why you want Max(RecID) ?
    If you want use this to generate next ID for record,
    then this is not correct way in Valentina.

Because DELETED records make wholes in table, and the next AddRecord()
May use that space. So you can have 10 records in table,
Delete 3d record, then add new record and it will get RecID = 3.

As I see you use ObjectPtr fields, i.e. You use Valentina links instead of
RDBBMS FOREIGN KEY. Them why you need at all control ID values ?
Just use RecID values. This is easy and comfortable.



> I just opened it in VAPP and no methods appeared!
> Also, where do I find Vstudio? I did not see that on the website - is
> that a PC version of VAPP?


> On Aug 24, 2004, at 5:21 PM, Ruslan Zasukhin wrote:
> 
>> On 8/25/04 12:07 AM, "Daniel Crowder" <daniel at monumental-i.com> wrote:
>> 
>>> Ruslan,
>>> 
>>> I tried what you suggested and am not having any luck.
>>> 
>>> When I create the table I have added the following field:
>>> 
>>> addField(pdb.db, product_ref, "id", #kTypeUlong, "RecID")
>>> 
>>> If I understand you correctly, this should automatically serialize the
>>> "id" field with the RecID of that record.
>>> 
>>> When I do this and view the records all the "id" fields show a value
>>> of '0'.

-- 
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