Subject | RE: [IBO] continue of my problem AND edit_mode of the grid is false |
---|---|
Author | Claudio Valderrama C. |
Post date | 2001-01-22T00:46:56Z |
> -----Original Message-----join person_info on
> From: Meir Kalter [mailto:meir_klt@...]
> Sent: Domingo 21 de Enero de 2001 18:38
>
> Hello!
> I did not use procedure.
> i have person_info on one table, and in the second i have events number.
> event relation to person_info is many to one.
> I remove all my work. This was something like this:
>
> SELECT events.* , first_name, last_name FROM events
All from events and names from person. I assume events has a PK. However,
the same events will happen more than one time, since more than one person
can share the same event type (assuming this is your model), so there's no
unique values in this side. Please, include the PK fields for table
person_info.
> events.person_id = person_info.person_info_id.No, KeyLinks should be set to person_info.person_info_id and include this
> I set RequestLive to true, and KeyRelation to
> person_info.person_info_id (or events.person_id).
column in the SELECT part.
KeyRelation is the relation that you want to update when you have a join.
Then IBO can work automatically. If you need to apply changes to both sides,
you'll have to call a stored procedure in the *SQL properties. (EditSQL,
DeleteSQL and InsertSQL if I remember the names well.)
> And put some SQL for the update and insert SQL.I don't see an obstacle if you set the right properties.
> could i put in this table other join to the names of the events
> from other
> table, and select the type of the event with lookup?
> I Would want edit data from the query inside the grid itself.Yes, but to my knowledge, you can't edit both sides of a join if you don't
> Coulf it be done?
> I am sorry about my english.
write code for the *SQL properties I told you above. If you only want to
edit people, you can set KeyRelation to person_info and voila, IBO will do
the rest.
If you only want to select events for each person but not edit the
properties of the events themselves, then you need a subquery to bind it to
the lookup instead of a join.
C.