Subject Re: [firebird-support] Can't create embedded db programatically...
Author Helen Borrie
At 05:30 PM 18/07/2005 +0000, you wrote:
>Hi there. A while ago I was using fbembed in my app, but I had
>abandoned it for various reason. I'm now trying to reimplement fbembed
>as my backend db, but I'm having a problem. I can't create the db. It
>errors out every time. Here's my code:
>
>Dim ht as new Hashtable
>ht.Add("User", "myuser")
>ht.Add("Password", "mypass")
>ht.Add("Database", "myfdb.db")
>ht.Add("ServerType", 1)
>FbConnection.CreateDatabase(ht)
>
>
>During the createdatabase method, it throws an exception. Here's the
>message:
>
>"No message for code 335544324 found"
>
>I looked up that message number, and it means:
>
>"invalid database handle (no active connection)"

Not necessarily. The "No messsage" message usually means that you are
accessing the wrong version of firebird.msg. The error codes are generated
during the binary build so there's no guarantee that the match you make for
that error code is correct for your mixture of elements.


>It also creates a file called firebird.log that contains this error
>message:
>
>"WNET/wnet_error: CreateFile errno = 2"

That means that Windows was looking for a certain network path for creating
the file and it was an invalid path. I don't see a path in your
configuration. I don't recognise your client app environment but I suppose
this is your problem statement:

ht.Add("Database", "myfdb.db")

You need to use an absolute filespec for the database file, to a location
that actually exists, as seen on the server, e.g.

ht.Add("Database", "d:\databases\myfdb.db")

This must not resolve to a Windows network path, mapped drive, share, etc.,
but must be the absolute path.

./heLen