Delphi XE2
Firebird 2.5 - latest
IBDAC 4.2.8
I have had to update an application for a customer (application compiled after latest IBDAC update) and now the customer is unable to log into the database...always gets message 'Unavailable database...'. The database is sitting on their server. On the client machine the application .exe reads the registry to obtain the server name and path to the database. The DBName property is then set to ServerName:Path and Connected set to True. Never a problem in the past 6 years and have not made any changes to the connection part of the source code. Since this has only occurred after the latest IBDAC update can you please advise if this could be an IBDAC problem.
regards
Bill Zwirs
DB Connection problem
Re: DB Connection problem
Please disregard my previous post as it appears that the problem is probably caused by reading the registry value.
Since the last post I changed the connection procedure to use aliases so just had to set the Database property to the alias name and read the registry to get the name for the Server property. This resulted in the same error message as per previous post. So, (for the affected customer) hardcoded the server name to the server property and had no problem with the connection. Therefore, must assume the error is actually in reading the Registry value for the server name. Need to find what is causing this error but this is difficult as I don't get the same problem on my development machine, or, find an alternative to storing data in the registry.
regards
Bill Zwirs
Since the last post I changed the connection procedure to use aliases so just had to set the Database property to the alias name and read the registry to get the name for the Server property. This resulted in the same error message as per previous post. So, (for the affected customer) hardcoded the server name to the server property and had no problem with the connection. Therefore, must assume the error is actually in reading the Registry value for the server name. Need to find what is causing this error but this is difficult as I don't get the same problem on my development machine, or, find an alternative to storing data in the registry.
regards
Bill Zwirs
Re: DB Connection problem
Yes, such error may be raised, for example, when the IBCConnection.Server property obtains an empty value on the customer's computer.
You can implement some kind of a log file in your application, in order to find out which exact value is stored in the registry and assigned to the Server property.
Or you can use an ini-file to store connection properties.
You can implement some kind of a log file in your application, in order to find out which exact value is stored in the registry and assigned to the Server property.
Or you can use an ini-file to store connection properties.