Subject | Re: Embedded Database connect -904, "unavailable database? |
---|---|
Author | Jeff Lynn |
Post date | 2006-05-14T17:33:05Z |
I found it. My bad! I was testing with FBEmbed.dll renamed to
fbclient.dll in my standalone app, yet when I was testing another app
using a DLL, it some how found the client/server based fbclient.dll
instead of the much smaller FBEmbed.dll.
I don't know, just wonder why Firebird developer didn't release a
proper named DLL pair such as FBEmbed.dll and FBEmbed.lib instead of
having to rename it to FBCLient.DLL.
I can see it may be more convienent to test against host based serv
and then without any change, release it as stand-alone "embedded"
version. But it sure confuse the diagnostic problem.
jml
----- In firebird-support@yahoogroups.com, "Jeff Lynn" <jmlynn@...> wrote:
fbclient.dll in my standalone app, yet when I was testing another app
using a DLL, it some how found the client/server based fbclient.dll
instead of the much smaller FBEmbed.dll.
I don't know, just wonder why Firebird developer didn't release a
proper named DLL pair such as FBEmbed.dll and FBEmbed.lib instead of
having to rename it to FBCLient.DLL.
I can see it may be more convienent to test against host based serv
and then without any change, release it as stand-alone "embedded"
version. But it sure confuse the diagnostic problem.
jml
----- In firebird-support@yahoogroups.com, "Jeff Lynn" <jmlynn@...> wrote:
>only.
> Thanks, Helen,
>
> I am using FB 1.5.3 and the stand-alone test app had been compiled to
> link to the renamed DLL to FBClient.dll and using the FBClient.lib.
> I am runing only one single application when using the Test
> application, no other application is running, no Firebird server
> running as well. It works in my Test app. But my second test app
> that call a custom DLL, which then connect to the database file
> without using any host string, just like the single test applcation
> and using the attach API with the file name "D:\Databases\Test.fdb"
>D:\Databasess\Test.fdb" on
> Since it did not work in my DLL, I wonder what else did I missed that
> cause it not to find the database or somehow cannot get exclusive use
> of the database file? I am sure no other application is running other
> than my Test appl that call the DLL.
>
> jml
> --- In firebird-support@yahoogroups.com, Helen Borrie <helebor@> wrote:
> >
> > At 10:41 AM 14/05/2006, you wrote:
> > >Does anyone know what caused error -904, "unavilable datbase" error?
> > >
> > >I can connect to the embedded database file
> > >a stand alone application, but when I cut-and-paste the code into a
> > >DLL such that the DLL will connect to the file database upon first
> > >function call
> > > if (m_pDb == NULL)
> > >....
> > >
> > >I used the isc_expand_dpb() api to define the userId and password,
> > >
> > >then I use isc_attach_database to attach to the database, there is
> > >where I got the -904 error, which is "unavailable database?
> >
> > It probably means that the client that your app is connecting to
> > can't find a server. Which client version is the app loading?
> >
> >
> > >What did I do wront, since my Test.exe works fine using the
> database file?
> >
> > It's worthwhile to understand that there is no such thing as "an
> > embedded database". The "embedded server" model (fbembed.dll) is a
> > single instance of fbclient.dll that connects to a single (embedded)
> > instance of the Superserver. This client can connect to multiple
> > databases but
> >
> > a) it needs exclusive access to the database[s] in order to do so
> > and
> > b) once it has connected to a database, no other client can connect
> > to that database
> >
> > Make your client load fbembed.dll and ensure that there is no
> > hostname in the connection string.
> >
> > ./heLen
> >
>