Subject Re: [IBO] "Unavailable database"
Author Helen Borrie
At 09:48 PM 31/01/2006, you wrote:
>I keep getting this error message when trying to connect usinq IBSQL:
>ISC ERROR CODE:335544375
>unavailable database
>I am using the latest Firebird embedded version and can connect easily
>to the fdb file with IbExpert.
>When using IBSQL I point to the database file ...\DB.fdb with
>Username SYSDBA & password masterkey. I have both fbclient.dll &
>gds32.dll in the same directory.
>What am I doing wrong?

Same directory as what? fbclient.dll and gds32.dll need to be in the
same directory as the application (ib_sql.exe). If this wasn't what
you meant by the statement above, then either copy ib_sql.exe into
your application directory and run it from there, or copy the two
dlls into the directory where ib_sql.exe is.

Note, too, that when using embedded you have to duplicate the
necessities for *each* application directory structure.

If all those things are covered, then the next thing to look at is
whether you are concurrently working on this database with some other
app, e.g. IBExpert, isql, the Delphi IDE, or whatever. The first
instance of embedded gets an exclusive lock, making the database
unavailable for any other instances.

You'll bump into the same restriction if you try to do your
development using the embedded version. The first connection is
usually Delphi. It wins (gets the exclusive lock) and you won't be
able to run the app from the IDE. Use the full server for
development and use embedded when you deploy.