Subject Re: [IBO] Engine Version in IB_Components.pas
Author Jason Wharton
Alan,

> IB_Components returns the engine version with with (pre V4.9)
>
> dbVersion := Copy(pchar(@Results[ItemPtr+2]), 1,
> byte( Results[ItemPtr+1]) );
>
> Now, in V4.9.6 this doesn't work, why?
>
> dbVersion := Copy( AnsiString( PByte( @Results[ItemPtr+2] )),
> 1,
> byte( Results[ItemPtr+1]) );
>
> Anyone know what it should be?


These are the necessary fixes for the database characteristics properties:

Unit IB_Components.pas:

At line 16754:

dbFile := Copy( StrPas( PAnsiChar( @Results[ItemPtr+2] )),
1,
byte( Results[ItemPtr+1]) );
dbSite := Copy( StrPas( PAnsiChar( @Results[ItemPtr +
byte( Results[ItemPtr+1])+3])),
1,
byte( Results[ItemPtr+ byte(
Results[ItemPtr+1])+2]));

At line 16778:

isc_info_version:
begin
dbVersionPrefix := byte(Results[ItemPtr]);
dbVersion := Copy( StrPas( PAnsiChar( @Results[ItemPtr+2] )),
1,
byte( Results[ItemPtr+1]) );
end;
isc_info_firebird_version:
begin
dbFBVersionPrefix := byte(Results[ItemPtr]);
dbFBVersion := Copy( StrPas( PAnsiChar( @Results[ItemPtr+2] )),
1,
byte( Results[ItemPtr+1]) );
ExtractVersionInfo;
end;

Regards,
Jason Wharton