Design question

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Sep 2 08:45:05 CDT 2003


on 9/2/03 6:02 AM, James Kleinschmidt at jkleins at shentel.net wrote:

Hi James,

> I am starting to use V4RB and had a design question. If I wanted to do
> this what is the best way?
> 
> Appointments
> Createdby --> linked to users "ID"
> ModifiedBy--> linked to users "ID"
> Name

> Users
> ID
> Name


> I tried making both vObjectPtrs but I can only get them to show on a
> "Select * from appointments, users" if I only use one of the links.

> They both work in the VDB app but as soon as I close it and reopen it
> one of the links is disabled. I can only guess that you can't use 2
> links to the same table.

Valentina CAN use 2 and more links to the same table,
And even to make self - recursions.

You need query as

    SELECT * 
    FROM appointments, users
    WHERE users.id = appointments.Createdby
            and users.id = appointments.ModifiedBy

> If not what would be the best way to get the
> functionality I need above? Any suggestions would be appreciated.

Actually I do not see what functionality you need.
You want display in the same time 2 users?
Then probably you need

    SELECT * 
    FROM appointments, users a, users b
    WHERE appointments.Createdby = a.id and
          appointments.ModifiedBy = b.id


> I also noticed that a cursor on the above select statement returns the
> field names as listed. If I use a field with the same name would I be
> able to distinguish which table it came from with appointment.name,
> user.name. 

We have no aliases yet.

> I tried this and could not get it to work but I was also
> having the other problem as well and that may have been the culprit. Do
> I need to make sure the table names don't overlap?

If you worry about what User see on monitor then probably yes.

> Sorry if this has been covered I wasn't able to find anything about it.

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