Subject Re: [IBO] Problems using DatabaseName with aliases
Author Helen Borrie
At 03:16 AM 1/02/2004 +0000, you wrote:
>Hello everyone.
>
>I've encountered a problem converting an old app to IBO4 related to
>DatabaseName and aliases.
>
>If I set the databasename to an alias on the local machine it does
>not set the path and database property. This means that you cannot
>connect to the database if you are using an alias as long as you use
>DatabaseName.

Correct, it works the other way around:

Set the Server, Path and Protocol properties and IBO by default will
construct DatabaseName as a correct full connection path.

You can then go and replace the DatabaseName with your own code-friendly
name.

Now, what happens if you then go in afterwards and set up the Server, Path
and Protocol properties to something different, IBO respects the
DatabaseName property and does not modify it again.

If, on the other hand, you decide to enter a new String into the
DatabaseName property, then there is no "back-route" - IBO doesn't parse
the new string and try to make sense of it as a database path - because it
is already just an alias string.

Server, Path and Protocol are always the properties you should use. I
always set the Databasename to an alias immediately upon setting those
properties. This ensures that the data access objects pick up the alias
and not some confusing string that looks like a database connection string.

Helen