As far as I understand, with embedded server you don't specify the server;
just the database name, eventually with the full path. I've tested both
with and without path. I've copied all files from lib directory under
firebird, so the linux equivalents to icu*.dll etc are present. Also copied
firebird.msg, .conf and security2.fdb.
I think the server is working fine, I can create the database with isql;
there is something wrong with the provider's resources, or the way they are
accessed in mono.

Ernesto




2014-07-29 11:12 GMT-03:00 Edward Mendez <emendez...@nc.rr.com>:

> Ernesto,
>
>
>
> In my connection string for Embedded Server (on Windows) I have the
> following;
>
>
>
> "data source=localhost;Client Library=|DataDirectory|fbembed.dll;initial
> catalog=<pathToDatabase>\<DataBaseName>.FDB;user
> id=sysdba;password=masterkey;server type=1"
>
>
>
> I needed to specify the path to the Database File, along with the Path to
> the fbembed.dll and also the localhost.  I also needed to include the
> following files in my output folder…
>
>
>
> firebird.conf, firebird.msg, ib_util.dll, icudt30.dll, icuin30.dll,
> icuuc30.dll
>
>
>
> Hope this helps,
>
>
>
> Ed Mendez
>
>
>
> *From:* Ernesto Cullen [mailto:ernestocul...@gmail.com]
> *Sent:* Tuesday, July 29, 2014 9:28 AM
> *To:* firebird-net-provider@lists.sourceforge.net
> *Subject:* [Firebird-net-provider] Problem reading resources on linux
>
>
>
> I've created a small program to test firebird access with an embedded
> server on linux (with mono), but I am getting errors related to resources.
>
>
> This is the program:
> namespace ConsoleFBTest
> {
>     class MainClass
>     {
>         public static void Main (string[] args)
>         {
>             Console.WriteLine ("Creating database...");
>             FbConnection.CreateDatabase(
> "ServerType=1;client 
> library=libfbembed;Dialect=3;Database=test.fdb;User=sysdba;password=masterkey"
> );
>         }
>     }
> }
>
>
>
> easy enough, I just want to create a database. I've copied all firebird
> lib/* files into target dir, along with firebird.msg, security2.fdb,
> firebird.conf, intl/*. I tested that the embedded server works copying also
> isql and executing from command line.
>
> When I run previous program, both from MonoDevelop and from command line,
> I get the output below. I think it may have to do with resources formatting
> or embedding in the firebird client dll? maybe eol characters? old mono
> version? running out of ideas here, please help!
>
> Ernesto Cullen
>
>
>
> Mono version:
> -------------------------------------
> mono --version
> Mono JIT compiler version 2.10.8 (tarball Mon Apr  7 03:54:27 IST 2014)
> Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors.
> www.mono-project.com
>     TLS:           __thread
>     SIGSEGV:       altstack
>     Notifications: epoll
>     Architecture:  amd64
>     Disabled:      none
>     Misc:          debugger softdebug
>     LLVM:          supported, not enabled.
>     GC:            Included Boehm (with typed GC and Parallel Mark)
>
> NETProvider: NETProvider-4.2.0.0-MONO_LINUX
>
> Firebird: FirebirdCS-2.5.3.26778-0.amd64
>
>
>
> program output
> -------------------------------------------------------------------
>
> Creating database...
>
> Unhandled Exception: System.ObjectDisposedException: The object was used
> after being disposed.
>   at System.IO.UnmanagedMemoryStream.Seek (Int64 offset, SeekOrigin loc)
> [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceReader.LoadResourceValues
> (.ResourceCacheItem[] store) [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceReader+ResourceEnumerator.FillCache ()
> [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceReader+ResourceEnumerator..ctor
> (System.Resources.ResourceReader readerToEnumerate) [0x00000] in <filename
> unknown>:0
>   at System.Resources.ResourceReader.GetEnumerator () [0x00000] in
> <filename unknown>:0
>   at System.Resources.ResourceSet.ReadResources () [0x00000] in <filename
> unknown>:0
>   at System.Resources.ResourceSet.GetObjectInternal (System.String name,
> Boolean ignoreCase) [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceSet.GetObject (System.String name, Boolean
> ignoreCase) [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceSet.GetStringInternal (System.String name,
> Boolean ignoreCase) [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceSet.GetString (System.String name) [0x00000]
> in <filename unknown>:0
>   at FirebirdSql.Data.Common.IscException.BuildSqlState () [0x00000] in
> <filename unknown>:0
>   at FirebirdSql.Data.Common.IscException.BuildExceptionData () [0x00000]
> in <filename unknown>:0
>   at FirebirdSql.Data.Client.Native.FesConnection.ParseStatusVector
> (System.IntPtr[] statusVector, FirebirdSql.Data.Common.Charset charset)
> [0x00000] in <filename unknown>:0
>   at FirebirdSql.Data.Client.Native.FesDatabase.ParseStatusVector
> (System.IntPtr[] statusVector) [0x00000] in <filename unknown>:0
>   at FirebirdSql.Data.Client.Native.FesDatabase.CreateDatabase
> (FirebirdSql.Data.Common.DatabaseParameterBuffer dpb, System.String
> dataSource, Int32 port, System.String database) [0x00000] in <filename
> unknown>:0
>   at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.CreateDatabase
> (FirebirdSql.Data.Common.DatabaseParameterBuffer dpb) [0x00000] in
> <filename unknown>:0
>   at (wrapper remoting-invoke-with-check)
> FirebirdSql.Data.FirebirdClient.FbConnectionInternal:CreateDatabase
> (FirebirdSql.Data.Common.DatabaseParameterBuffer)
>   at FirebirdSql.Data.FirebirdClient.FbConnection.CreateDatabase
> (System.String connectionString, Int32 pageSize, Boolean forcedWrites,
> Boolean overwrite) [0x00000] in <filename unknown>:0
>   at FirebirdSql.Data.FirebirdClient.FbConnection.CreateDatabase
> (System.String connectionString) [0x00000] in <filename unknown>:0
>   at ConsoleFBTest.MainClass.Main (System.String[] args) [0x00000] in
> <filename unknown>:0
> [ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: The
> object was used after being disposed.
>   at System.IO.UnmanagedMemoryStream.Seek (Int64 offset, SeekOrigin loc)
> [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceReader.LoadResourceValues
> (.ResourceCacheItem[] store) [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceReader+ResourceEnumerator.FillCache ()
> [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceReader+ResourceEnumerator..ctor
> (System.Resources.ResourceReader readerToEnumerate) [0x00000] in <filename
> unknown>:0
>   at System.Resources.ResourceReader.GetEnumerator () [0x00000] in
> <filename unknown>:0
>   at System.Resources.ResourceSet.ReadResources () [0x00000] in <filename
> unknown>:0
>   at System.Resources.ResourceSet.GetObjectInternal (System.String name,
> Boolean ignoreCase) [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceSet.GetObject (System.String name, Boolean
> ignoreCase) [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceSet.GetStringInternal (System.String name,
> Boolean ignoreCase) [0x00000] in <filename unknown>:0
>   at System.Resources.ResourceSet.GetString (System.String name) [0x00000]
> in <filename unknown>:0
>   at FirebirdSql.Data.Common.IscException.BuildSqlState () [0x00000] in
> <filename unknown>:0
>   at FirebirdSql.Data.Common.IscException.BuildExceptionData () [0x00000]
> in <filename unknown>:0
>   at FirebirdSql.Data.Client.Native.FesConnection.ParseStatusVector
> (System.IntPtr[] statusVector, FirebirdSql.Data.Common.Charset charset)
> [0x00000] in <filename unknown>:0
>   at FirebirdSql.Data.Client.Native.FesDatabase.ParseStatusVector
> (System.IntPtr[] statusVector) [0x00000] in <filename unknown>:0
>   at FirebirdSql.Data.Client.Native.FesDatabase.CreateDatabase
> (FirebirdSql.Data.Common.DatabaseParameterBuffer dpb, System.String
> dataSource, Int32 port, System.String database) [0x00000] in <filename
> unknown>:0
>   at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.CreateDatabase
> (FirebirdSql.Data.Common.DatabaseParameterBuffer dpb) [0x00000] in
> <filename unknown>:0
>   at (wrapper remoting-invoke-with-check)
> FirebirdSql.Data.FirebirdClient.FbConnectionInternal:CreateDatabase
> (FirebirdSql.Data.Common.DatabaseParameterBuffer)
>   at FirebirdSql.Data.FirebirdClient.FbConnection.CreateDatabase
> (System.String connectionString, Int32 pageSize, Boolean forcedWrites,
> Boolean overwrite) [0x00000] in <filename unknown>:0
>   at FirebirdSql.Data.FirebirdClient.FbConnection.CreateDatabase
> (System.String connectionString) [0x00000] in <filename unknown>:0
>   at ConsoleFBTest.MainClass.Main (System.String[] args) [0x00000] in
> <filename unknown>:0
>
> --
>
> "Either write something worth reading or do something worth writing" B.
> Franklin
>
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>
>


-- 
"Either write something worth reading or do something worth writing" B.
Franklin
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to