Subject Re: IBO 4.5Ai TIBOtable problem
Author colincoleman2002
I have more information as to where the IBO component crashes: it
appears to be in the following routine.

procedure TIBODataset.InternalOpen;
begin
if not InternalDataset.Prepared then
InternalDataset.Prepare;
if FRefreshingParamsLevel = 0 then
begin
FIncludeOutputParams := false;
if ( InternalDataset.FieldCount > 0 ) and
( FieldDefs.Count = 0 ) then
InternalInitFieldDefs;
if DefaultFields then
CreateFields;
if foAutoAppendAllFields in FFieldOptions then
AppendOtherFields;
BindFields( True );
InitFields;
FRecInfoOfs := FRecordSize + CalcFieldsSize;
FRecBufSize := FRecInfoOfs + SizeOf( TIBORecInfo );
end;
InternalDataset.FIsCursorOpen := true;
end;


Stepping through in Delphi 7.0 creashes on the line BindFields(
True );, even trying to use stepinto will not work as it just
crashes without opening the routine.. if this is any help

Thanks

Colin









--- In IBObjects@yahoogroups.com, "colincoleman2002"
<yahoogroups@c...> wrote:
>
> We have a larger project that essentially has a TIBOQuery as a
> master and a TIBOTable as a detail table, the program uses the SQL
> to create a complex query that returns only the Primary key field
> for the table required,
>
> The Query And Table are configured Thus:-
> With DataModule1 Do
> Begin
> IBOTableClient.Close;
> IBOTableServer.Close;
> IBOQueryClient.Close;
> IBOQueryServer.Close;
>
> IBOQueryClient.SQL.Clear;
> IBOQueryClient.SQL.Add(sClientSql);
> IBOQueryServer.SQL.Clear;
> IBOQueryServer.SQL.Add(sServerSql);
>
> IBOTableClient.TableName := sTableName ; // EG CUSTOMERS
> IBOTableServer.TableName := sTableName ;
> IBOTableClient.MasterFields := sPrimaryKeyname ; // EG CUSTREF
> IBOTableServer.MasterFields := sPrimaryKeyname ;
> IBOTableClient.IndexFieldNames := sPrimaryKeyname ; // Eg
CUSTREF
> IBOTableServer.IndexFieldNames := sPrimaryKeyname ;
>
> IBOQueryClient.Open; // Always open Fine ;-)
> IBOQueryServer.Open;
>
> IBOTableClient.OPen; // RANDOM CRASHES...Field not found
> IBOTableServer.Open; // RANDOM CRASHES ...Field not found
> end;
> End;
>
> THE PROBLEM:
> This has worked for years with no changes, wher there are about 50
> tables, and this routine is called with each SQL, tablename,
> Prikey,etc... BUT since upgrading from Ver 4.0 to 4.5Ai, what
> happens is that the 2 TIBOTables randomly dont change the
tablename
> to the next table , on investigation we can see that the internal
> fieldnames are still pointing to the previous table thus giving us
> the error, "Field custref not found", even though the
> IBOTABLE.tablename says the correct table.
>
> its as though the setting of TIBOTable.Tablename does not retrieve
> the fields from the database, but retains the last field list, of
> course when the table is opened it crashes.
>
> Where do i look to fix this SERIOUS problem with 4.5Ai ?
>
> Cheers
>
> Colin Coleman