Subject | Re: [IBO] Lookup on Client table |
---|---|
Author | Helen Borrie |
Post date | 2006-10-09T11:21:12Z |
Quick answer, sorry, too much to do b4 I leave...
Don't use lookup fields, use either a joined set specification or a
subquery to get what you'd use a lookup field for in Paradox.
And there's still no info in what you've provided to account for
BeforePost activity occurring upon calling Insert. Either you're
doing something in BeforeInsert that you have forgotten about or
you've got something hanging about there with NeedToPost true - maybe
the call to Insert happening while you have another unposted record?
Apols for the top-post.
Helen
At 12:59 AM 9/10/2006, you wrote:
Don't use lookup fields, use either a joined set specification or a
subquery to get what you'd use a lookup field for in Paradox.
And there's still no info in what you've provided to account for
BeforePost activity occurring upon calling Insert. Either you're
doing something in BeforeInsert that you have forgotten about or
you've got something hanging about there with NeedToPost true - maybe
the call to Insert happening while you have another unposted record?
Apols for the top-post.
Helen
At 12:59 AM 9/10/2006, you wrote:
>--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
> >
> >
> > Can you explain what you mean by "add a lookup to the client"?
> >
>Sorry for being obtuse, I mean an fkLookup field added using the
>IBOQuery fields editor.
>
> > Let's first get clear about what you're doing here. If you have
> > implemented a master-detail relationship then the master record
>must
> > be posted before inserting a detail record can be allowed. So -
>if
> > you have actually inserted into the master record but that record
>is
> > not yet posted, then IBO posts the master record first, before
> > putting the detail set into dsInsert. So, if anything, the
>required
> > entry FieldX is in the master record, not the detail. IBO is
>aware
> > of required fields and it won't let a Post proceed if any
> > non-nullable fields are null. You're getting this error on the
> > client side: this is BeforePost checking which IBO does to avoid
> > incurring exceptions by posting blindly.
> >
>The master table entries ('Suppliers') are added sperately via a
>seperate screen (window). Thus they are pre-existent to the detail
>entry.
>The Detail input screen ('Contacts') uses the pre-
>existent 'Suppliers' table entries to enter supplier contacts
>(detail table).
>
> > It's not a question of a "workaround". Only to make sure that
> > anything that has to be posted is ready to post. To provide a
> > solution for the user, mark the required field in some way and
>then
> > be ready intercept the error if he decides to move on before
> > finishing what he started. You can then send him a friendly
>message
> > like "Can't proceed until the compulsory fields are filled" and
>hop
> > the focus back to the first offending field.
> >
> > Helen
> >
>As mentioned, without the lookup field the app works fine, it's only
>when one adds the lookup field that things go awry.
>Master table PK field 'Supplier_ID' is autogen int.
>(Master table (Suppliers) 'Supplier_Name' field is a required field)
>Detail table 'Contact_ID' is autogen integer.
>Detail table 'Supplier_ID' is FK field set to Master 'Supplier_ID'
>on insert (by IBO).
>Detail LookupField 'Supplier_Name' is based on:
>LookupDataset -> Supplier
>LookupKeyField -> Supplier_ID
>LookupResultField -> Supplier_Name
>KeyField -> Supplier_ID
>
>The way I have structured things, having first to creat a
>supplier 'profile' before a user can (seperate screen) add a contact
>was done to prevent users trying to enter a contact before the
>supplier entry was done. It's a system which I worked under (by
>another programmer) as a user some years ago and I think is pretty
>much fail-safe (at least so my experience goes). Maybe there's a
>better way but resticting entry to one table at a time is the way
>this sytem works. One cannot add 'detail' until the master 'profile'
>is first entered. Maybe there's a better way?
>
>Thanks for the time and effort Helen.
>
>Regards
>
>
>
>
>
>
>
>___________________________________________________________________________
>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 !
>Yahoo! Groups Links
>
>
>
>
>
>
>