|Subject||Re: [IBO] Design problem with hybrid master/detail relation, or subset records|
I think you're missing the "OnNewRecord" event.
----- Original Message -----
From: Marco Menardi
Sent: Monday, October 29, 2001 10:37 PM
Subject: [IBO] Design problem with hybrid master/detail relation, or subset records
I've some queries that have to work for a restricted set of records at
a time, i.e. show me only data about a certain fiscal year on tables
that contain data for many of them (years I mean).
I've no problems for select, since I've put a parameterised query
select * from inventory where fisc_year = :p_fisc_year
(of course fisc_year is part of the primary keys)
and I assign parameter value in the PrepareSQL event of the query.
But things don't work if I want to insert or search records, since in
insert PrepareSQL is not called, so fisc_year remains null (I could
put it's value in the AfterInsert event), and using SearchBar calls
PrepareSQL but seems not to consider fisc_year.
Is there a better way to solve this situation?
I could have a "master query" with fiscal years and put all the other
queries in a master/detail relation with it, but this obliges me to
keep the fiscal years query open all the time on the current record,
and complicates my design too much. I want the user enter the year
(i.e. '2001') and then work with data regarding only that year, until
he changes the year again.
I think I'm missing something very simple here, but I can't figure out
what it is :)
Thanks for your help
Yahoo! Groups Sponsor
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]