Subject | Re: [IBO] "newbie needs advice" think he's there but stuck on masterParamLinks |
---|---|
Author | Jason Wharton |
Post date | 2001-06-26T19:48:39Z |
MasterParamLinks is used in a custom master-detail relationship where you
want a parameter in the detail dataset to receive the value from columns in
the master dataset. It is possible to only have one master dataset referred
to.
If you need to have more than one master you need to simply write code to
plug the values into the parameter manually. Use the alternate master
dataset OnDataChange event (from a datasource) and plug the value into the
parameter. I suggest you use the Assign( ) between the master column and the
detail param so that it will only cause the detail to refresh when the value
has actually changed. Either that or compare them before assigning the new
value to it. Otherwise you will cause the detail dataset to refresh more
often than necessary.
HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
want a parameter in the detail dataset to receive the value from columns in
the master dataset. It is possible to only have one master dataset referred
to.
If you need to have more than one master you need to simply write code to
plug the values into the parameter manually. Use the alternate master
dataset OnDataChange event (from a datasource) and plug the value into the
parameter. I suggest you use the Assign( ) between the master column and the
detail param so that it will only cause the detail to refresh when the value
has actually changed. Either that or compare them before assigning the new
value to it. Otherwise you will cause the detail dataset to refresh more
often than necessary.
HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "Greg" <rightwingfacist@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, June 26, 2001 12:31 PM
Subject: [IBO] "newbie needs advice" think he's there but stuck on
masterParamLinks
>
> I still have a problem, though, which is after the SQL.
>
> I need a left join somewhere, since the attendance details may/may-
> not already exist for each student. And then once I've pinned down
> the select SQL I then fill in the update/edit/delete sql slots to
> make it updateable. anyway here's the select SQL for any lovely
> person who would like to tell me how unnecessary it all is :
>
>
> select s.name, s.student_id, ad.hours, ad.attendance_detail_id,
> ad.attendance_id
> from (student_contract_link scl
> join student s on scl.student_id=s.student_id)
> left join attendance_detail ad on s.student_id=ad.student_id
> where scl.contract_id=:contract_id and
> attendance_detail.attendance_id=:attendance_id
>
>
> My problem now is that the two parameters in the "where" clause are
> supposed to be fetched from the master dataset. I beleive I am
> supposed to do this via masterParmLinks. The online help suggests
> that this is used exactly the same as for parametized queries, Except
> that whichever way I think about it, and whatever I try, it doesn't
> work. The online help doesn't elaborate (no example) and the samples
> don't use this property.
>
> So I'm stuck.
>
> Help!
>
> Greg
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>