Subject | Re: [IBO] cascade relations |
---|---|
Author | Paul Vinkenoog |
Post date | 2003-08-24T21:36:43Z |
Hello Gediminas,
that RequestLive makes a *Dataset* (a TIB_Query, for instance)
updatable and deletable. When RequestLive is true, you can edit fields
in the Grids and other controls, and delete records.
So in your case, you need it for Classes and Class_Dances (at least if
you want your users to be able to change and delete records), but not
for a Lookup set where you only look values up.
consider it something between IBO and the server for now. You can
write great IBO applications without ever using FOR UPDATE explicitly.
because IBO can't guess upon which table you want to perform the
insert, update or delete operation... unless you name it explicitly in
the KeyRelation property. You can only name one single table here.
(Actually, you can also leave KeyRelation blank and write custom
InsertSQL etc., but that's a lot more work.)
If a dataset contains no JOIN, or if you don't care if it's
effectively read-only, you don't need to set KeyRelation.
If you use a JOIN and you want more then one table to be writable, you
must use SPs and custom InsertSQL etc., instead of KeyRelation.
In your case, if (and only _if_) you use a JOIN in what I called
qryClassDancesDet, you must set its KeyRelation to Class_Dances, or
users won't be able to add or modify records.
Greetings,
Paul Vinkenoog
> RequestLive says, that it "make a SELECT statement updatable andThat's correct. Maybe the Help text would have been clearer if it said
> deletable" - what does it mean? As I understand, SELECT selects a
> subset of records and there is no any updatable or deletable action.
that RequestLive makes a *Dataset* (a TIB_Query, for instance)
updatable and deletable. When RequestLive is true, you can edit fields
in the Grids and other controls, and delete records.
So in your case, you need it for Classes and Class_Dances (at least if
you want your users to be able to change and delete records), but not
for a Lookup set where you only look values up.
> select .... for update <- don't understand till now ;)I've never used this ...FOR UPDATE syntax directly myself. Just
consider it something between IBO and the server for now. You can
write great IBO applications without ever using FOR UPDATE explicitly.
> KeyRelation - almost nothing in help file about this - how to use inIf you have a dataset with a JOIN, it is by default not writable
> my case?
because IBO can't guess upon which table you want to perform the
insert, update or delete operation... unless you name it explicitly in
the KeyRelation property. You can only name one single table here.
(Actually, you can also leave KeyRelation blank and write custom
InsertSQL etc., but that's a lot more work.)
If a dataset contains no JOIN, or if you don't care if it's
effectively read-only, you don't need to set KeyRelation.
If you use a JOIN and you want more then one table to be writable, you
must use SPs and custom InsertSQL etc., instead of KeyRelation.
In your case, if (and only _if_) you use a JOIN in what I called
qryClassDancesDet, you must set its KeyRelation to Class_Dances, or
users won't be able to add or modify records.
Greetings,
Paul Vinkenoog