Subject Re: [ib-support] Re: Interbase Security
Author Doug Chamberlin
At 04/17/2002 09:10 AM (Wednesday), Diego Gomez wrote:
>I make two databases, with the same estructure, the same size, the same
>users and passwords, everything. And i put different alias to each one of
>them. Then i connect an application that i developed in Delphi with one of
>the databases. Next, i finish the application, and i try to connect it
>with the other Database, just by "Switching" the Aliases. My application
>doesnt know wich application is it connected and it works exactly the
>same. I dont want this to happen. How can my application notice when it
>is working with another Database?

I can think of two ways:
1) Place a table in each database with one record which identifies that
database. Have your application read that one record to determine which
database it is using.
2) Have you application obtain from the Session object the translation of
the alias name being used. From the alias properties you can get the
connection string used and those will be different between the two
databases. (This assumes a BDE style alias.)