Subject RE: [IBO] Master-Detail for beginner
Author John Elliott
Thanks for looking into this, Helen. However all appears to be as it should,
RequestLive is true on both datasets, and both are opened and prepared. I
did remove the 'FOR UPDATE' from both SQL statements and now the app hangs
up with message: EIB_StatementError, 'Blank SQL statement not allowed.
Rechecking shows no blank SQL statements. I'm about ready to give up on
this.

-----Original Message-----
From: Helen Borrie (TeamIBO) [mailto:helebor@...]
Sent: Saturday, March 09, 2002 6:39 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Master-Detail for beginner


At 02:45 PM 09-03-02 -0500, John Elliott wrote:
>Hello,
>
>I am a newbie to IB Objects after years of Paxadox and dBase development. I
>am working on an invoicing form using the following:
>
>Delphi 4, IB 6.0 open source, IB Objects 4.2Fb
>
>Table INV_HEADER
> Primary key: ID
> TIB_Query.SQL: SELECT * FROM INV_HEADER FOR UPDATE
> .KeyLinks: INV_HEADER.ID
>
>Table INV_DETAIL
> Primary key: ID
> Foreign key: HDR_ID, references INV_HEADER.ID
> TIB_Query.SQL: SELECT * FROM INV_DETAIL FOR UPDATE
> .KeyLinks: INV_DETAIL.ID
> .MasterLinks: INV_DETAIL.HDR_ID=INV_HEADER.ID
> .MasterSource: dsInvHeader
>
>The form consists of several TIB_Edits for Header data and a TIB_Grid for
>Detail data.
>
>My Problem: When I open the form all header data appears to be fine, an id
>is generated and data can be entered into edits, but the Detail grid
appears
>to be uneditable, I cannot enter any data. All necessary column headers
>appear in the grid but nothing else.
>
>I have read and studied forever, it seems; but I am stuck. Any help would
be
>so very appreciated.

1. Remove the FOR UPDATE clauses from your queries
2. Make sure that you open both datasets explicitly.
3. Make sure that you set RequestLive true on both datasets.

Do you have the TI-sheet on Master-Detail from the TechInfo page?


regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com



___________________________________________________________________________
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 http://docs.yahoo.com/info/terms/