Subject | Re: IBO 4.5Ai TIBOtable problem |
---|---|
Author | colincoleman2002 |
Post date | 2005-04-02T11:32:45Z |
And some more investigation reveals:-
I have now built a clean Xp machine loaded Delphi7,IBO 4.20I ,And a
host of other components same as my main development machine, and
have copied the whole project from the main machine to the new PC
and then compiled the project using the DOS compiler, so i dont
change ANYTHING in the project and guess what it all Works
perfectly!. (Using IBO4.20i)
It Appears that whenever the IBOtable component gets written to it
seems to lock the fields into its memory somewhere and thats it, it
only wants to use for these fields forever once written, as though i
have created persistant fields, if this is the case how do i rectify
it, ive tried adding this following code during the table open and
it still crashes.
sTablename := IBOTableClient.TableName ; // Eg CUSTOMERS
FormMainReplicate.Memo1.lines.add(sTablename+'
Before='+IBOTableClient.SQL.Text +
' FieldCount ='+IntToStr(IBOTableClient.FieldCount));
IBOTableClient.SQL.Clear;
IBOTableClient.FieldDefs.Clear;
IBOTableClient.MasterSource := DataSourceQClient;
IBOTableClient.TableName := sTablename ;
FormMainReplicate.Memo1.lines.add(sTablename+ 'After='
+IBOTableClient.SQL.Text+
' FieldCount =' +
IntToStr(IBOTableClient.FieldCount));
Try
IBOTableClient.Open;
Except
FormMainReplicate.Memo1.lines.add('*** CRASHED *** '+
sTablename+' ='+
IBOTableClient.SQL.Text+' FieldCount ='+
IntToStr(IBOTableClient.FieldCount));
Exit;
End;
If you could help me with this i would be very grateful as i seem to
be getting nowhere except being able to pont the finger at IBO 4.5Ai
as the root cause.
Thanks Jason or anyone that can help me..
Colin
--- In IBObjects@yahoogroups.com, "colincoleman2002"
<yahoogroups@c...> wrote:
I have now built a clean Xp machine loaded Delphi7,IBO 4.20I ,And a
host of other components same as my main development machine, and
have copied the whole project from the main machine to the new PC
and then compiled the project using the DOS compiler, so i dont
change ANYTHING in the project and guess what it all Works
perfectly!. (Using IBO4.20i)
It Appears that whenever the IBOtable component gets written to it
seems to lock the fields into its memory somewhere and thats it, it
only wants to use for these fields forever once written, as though i
have created persistant fields, if this is the case how do i rectify
it, ive tried adding this following code during the table open and
it still crashes.
sTablename := IBOTableClient.TableName ; // Eg CUSTOMERS
FormMainReplicate.Memo1.lines.add(sTablename+'
Before='+IBOTableClient.SQL.Text +
' FieldCount ='+IntToStr(IBOTableClient.FieldCount));
IBOTableClient.SQL.Clear;
IBOTableClient.FieldDefs.Clear;
IBOTableClient.MasterSource := DataSourceQClient;
IBOTableClient.TableName := sTablename ;
FormMainReplicate.Memo1.lines.add(sTablename+ 'After='
+IBOTableClient.SQL.Text+
' FieldCount =' +
IntToStr(IBOTableClient.FieldCount));
Try
IBOTableClient.Open;
Except
FormMainReplicate.Memo1.lines.add('*** CRASHED *** '+
sTablename+' ='+
IBOTableClient.SQL.Text+' FieldCount ='+
IntToStr(IBOTableClient.FieldCount));
Exit;
End;
If you could help me with this i would be very grateful as i seem to
be getting nowhere except being able to pont the finger at IBO 4.5Ai
as the root cause.
Thanks Jason or anyone that can help me..
Colin
--- In IBObjects@yahoogroups.com, "colincoleman2002"
<yahoogroups@c...> wrote:
>SQL
> 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
> > to create a complex query that returns only the Primary keyfield
> > for the table required,CUSTREF
> >
> > 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
> > IBOTableServer.MasterFields := sPrimaryKeyname ;50
> > 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
> > tables, and this routine is called with each SQL, tablename,internal
> > 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
> > fieldnames are still pointing to the previous table thus givingus
> > the error, "Field custref not found", even though theretrieve
> > IBOTABLE.tablename says the correct table.
> >
> > its as though the setting of TIBOTable.Tablename does not
> > 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