I will start by describing the environment i have now.
My application code is running inside a game engine Unity3D. The code
is C# using mono which supports .NET 2.0.
The DB i am interested in is the embedded deployment, so when i ship
the game users don't need to install anything else.

The problem starts with the engine game packaging. I needed to place
the DLL in one place adn the DB file in a different place. I followed
the instructions here:
http://www.firebirdsql.org/manual/ufb-cs-embedded.html
and so my folder tree looked like this:
...
GameDirectory->
   Assets
      Plugins
         FirebirdSql.Data.FirebirdClient.dll
         fbembed.dll
         cu*.dll
         ib_util.dll
         firebird.conf -> RootDirectory = d:\GameDirectory\Assets\DB
      DB
         firebird.msg
         GAMEDB.FDB
When running the game i with this connection:
FbConnectionStringBuilder cs = new FbConnectionStringBuilder();
                        cs.ServerType = FbServerType.Embedded;
                        cs.Database = "GAMEDB.FDB";
                        cs.UserID = "SYSDBA";
                        cs.Password = "masterkey";

i got an exception 'IscException: I/O error during "CreateFile (open)"
Eventually the ONLY way i managed to open a connection to the DB was
using the Windows environment variable. Trying as you suggested
Environment.SetEnvironmentVariable got me I/O error as well.

As for the relative path, you are right, i can do that myself, but i
need to know how to set the DB path using RootDirectory.
So my initial question to which i still did not get an answer for-
should RoodDirectory configured in the firebird.conf actualy work in
the embedded deployment?

Until this point was my initial problem, but by now i encountered a
different one-
Trying to resolve the problem in a different way by connecting to a
firebird server i encountered another problem i have no clue where to
start solving, getting the following exception:

ArgumentNullException: Argument cannot be null.
Parameter name: path1
System.IO.Path.Combine (System.String path1, System.String path2)
System.Web.Configuration.WebConfigurationHost.GetWebConfigFileName
(System.String dir)
System.Web.Configuration.WebConfigurationHost.GetStreamName
(System.String configPath)
System.Configuration.Configuration.Init (IConfigSystem system,
System.String configPath, System.Configuration.Configuration parent)
System.Configuration.Configuration..ctor
(System.Configuration.InternalConfigurationSystem system,
System.String locationSubPath)
System.Configuration.Configuration..ctor
(System.Configuration.InternalConfigurationSystem system,
System.String locationSubPath)
System.Configuration.InternalConfigurationFactory.Create (System.Type
typeConfigHost, System.Object[] hostInitConfigurationParams)
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration
(System.String path, System.String site, System.String
locationSubPath, System.String server, System.String userName,
System.String password, Boolean fweb)

The last line executed before the exception is thrown is:
     int scalar = dbcmd.ExecuteNonQuery();

As you can see from the stack trace ExecuteNonQuery is not there, but
still this is the last line in the debugger. I am not sure this is a
firebird problem, but this really did left me hanging.
What's the best course of action to resolve this? (compiling a debug
version of the NETProvider?..)

Dimitry, Most likely?! do we know each other that you can calculate
the likelihood of me not knowing how to do it?
please assume i am more likely to handle your suggestions (if not
anything else) so this is resolved with the minimal amount of mail
going back and forth on trivial staff.

Thanks for your help!
Daniel.

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to