On Wednesday 23 April 2008 05:41:00 am Karsten Weinert wrote:
> Extending the question asked a few days ago, how can I handle 1:[1,0]
> relationships?
> Assume I have a master table with some information and a details table
> that may or may not
> have optional info, but at most one row.
>
> In the minimal example below I can teach my form
> to display this optional info, but by default, if I enter new optional
> info, and move
> forward and back through the masters dataset, the entered information is
> lost.
>
> I added a onValueChanged handler which creates a new details row if
> there is none, but
> this seems not practical for two reason. First, if I enter a new
> optional info and
> *directly* move to the next master's row (by hitting next) and then back,
> the information is still lost. Second, in my real form I have several data
> controls for
> the "details" table and it seems too tedious to add a event handler
> for each of these
> controls.
>
> Do you have another suggestion on how to handle this situation?
>
> Kind regards,
> Karsten.
>
I normally don't have two tables for a 1 to 1 relationship.  Most database 
engines today allow plenty of fields and hard drive space is very cheap these 
days.  So I keep the information in one table.  That said I believe I would 
use the IsChanged and ask the user if they wanted to save the data prior to 
moving off the record. Or somehow trigger the internal save routines 
bizChild.isChanged.  Using the internal routines to check will allow you to 
decide how the data change is to handled.  



-- 
John Fabiani


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to