Subject Re: [IBO] Error reading TIB_Connection->Characteristics in C++Builder 5
Author Helen Borrie
At 07:01 PM 17/04/2004 +0200, you wrote:
>Hi to all,
>i try to assign MyTIBConnection->Characteristics.dbVersion to a
>AnsiString variable but at run time appear an Error like this:
> Access violation at address xxxxxx in module 'VCL50.BPL'. Read of
>address xxxxx.
>
>If i debug the application i can inspect correctly the property
>MyTIBConnection->Characteristics and see all the values for dbVersion,
>dbForced_Writes, dbODS_Minor_Version, dbODS_Version, etc...
>
>Here an example of my C++ code:
>
> TIB_Connection * AConnection = MainDM->ConnectionIdeaDB;
>
> String ver;
> ver = AConnection->Characteristics.dbVersion; <== Here
>appear the error!
>
> DBServer->Caption = "Database Server: " + ver;
>
> etc...

Are you trying to read this property before the database is connected? To
test that, why not simply initialise the ver variable to avoid getting an
AV on the string assignment?

Helen