Quantcast

[firebird net] Install Firebird / Create Database File

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[firebird net] Install Firebird / Create Database File

Clyde Eisenbeis
I've recently written code using SQLite (C# .NET, System.Data.SQLite)
... decided to try Firebird.

To install Firebird: Visual Studio 2013 -> File -> New -> Project,
etc. ---------- then Tools -> Library Package Manager -> Manage NuGet
Packages -> search "firebird" -> Firebird ADO.NET Data provider ->
Install (button).

Resulted in a) References -> FirebirdSql.Data.FirebirdClient, and b)
FirebirdSql.Data.FirebirdClient.5.8.0 subdir ... with Firebird .dll's.

1) Was the the correct procedure?

2) How do I create a Firebird database file? ... as I did with SQLite
... System.Data.SQLite.SQLiteConnection.CreateFile(stPathFilename)
where the filename ends with .sqlite.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Jiří Činčura-2
> FirebirdSql.Data.FirebirdClient.5.8.0 subdir ... with Firebird .dll's.

To be precise, it's provider, not Firebird.
 
> 1) Was the the correct procedure?

Yes.

> 2) How do I create a Firebird database file? ... as I did with SQLite
> ... System.Data.SQLite.SQLiteConnection.CreateFile(stPathFilename)
> where the filename ends with .sqlite.

FbConnection.CreateDatabase.

--
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Clyde Eisenbeis
t) I've tried FbConnection.CreateDatabase ... using info from StackOverflow:

    int pageSize = 4096;
    bool forcedWrites = true;
    bool overwrite = false;
    var connectionString = new FbConnectionStringBuilder
    {
        Database = stPathFilename,
        ServerType = FbServerType.Embedded,
        UserID = "SYSDBA",
        Password = "masterkey",
        ClientLibrary = "fbclient.dll"
    }.ToString();
    FbConnection.CreateDatabase(connectionString, pageSize,
forcedWrites, overwrite);

I had presumed this is standard, except for the stPathFilename.

However, this code throughs an exception ... complains about
fbclient.dll.  I'm not sure what to use for Client Library.

On Wed, Mar 15, 2017 at 1:54 PM, Jiří Činčura <[hidden email]> wrote:

>> FirebirdSql.Data.FirebirdClient.5.8.0 subdir ... with Firebird .dll's.
>
> To be precise, it's provider, not Firebird.
>
>> 1) Was the the correct procedure?
>
> Yes.
>
>> 2) How do I create a Firebird database file? ... as I did with SQLite
>> ... System.Data.SQLite.SQLiteConnection.CreateFile(stPathFilename)
>> where the filename ends with .sqlite.
>
> FbConnection.CreateDatabase.
>
> --
> Mgr. Jiří Činčura
> https://www.tabsoverspaces.com/
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Firebird-net-provider mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Jiří Činčura-2
If you are not using the server, then location of your embedded Firebird library. 

--
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


On Thu, Mar 16, 2017, at 16:04, Clyde Eisenbeis wrote:
> t) I've tried FbConnection.CreateDatabase ... using info from
> StackOverflow:
>
>     int pageSize = 4096;
>     bool forcedWrites = true;
>     bool overwrite = false;
>     var connectionString = new FbConnectionStringBuilder
>     {
>         Database = stPathFilename,
>         ServerType = FbServerType.Embedded,
>         UserID = "SYSDBA",
>         Password = "masterkey",
>         ClientLibrary = "fbclient.dll"
>     }.ToString();
>     FbConnection.CreateDatabase(connectionString, pageSize,
> forcedWrites, overwrite);
>
> I had presumed this is standard, except for the stPathFilename.
>
> However, this code throughs an exception ... complains about
> fbclient.dll.  I'm not sure what to use for Client Library.
>
> On Wed, Mar 15, 2017 at 1:54 PM, Jiří Činčura <[hidden email]> wrote:
> >> FirebirdSql.Data.FirebirdClient.5.8.0 subdir ... with Firebird .dll's.
> >
> > To be precise, it's provider, not Firebird.
> >
> >> 1) Was the the correct procedure?
> >
> > Yes.
> >
> >> 2) How do I create a Firebird database file? ... as I did with SQLite
> >> ... System.Data.SQLite.SQLiteConnection.CreateFile(stPathFilename)
> >> where the filename ends with .sqlite.
> >
> > FbConnection.CreateDatabase.
> >
> > --
> > Mgr. Jiří Činčura
> > https://www.tabsoverspaces.com/
> >
> > ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Firebird-net-provider mailing list
> > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Firebird-net-provider mailing list
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Clyde Eisenbeis
I used "FirebirdSql.Data.FirebirdClient.dll" ... which is located in
my Debug subdir.

The exception is "Unable to find an entry point named
'isc_create_database' in DLL 'FirebirdSql.Data.FirebirdClient.dll".

On Thu, Mar 16, 2017 at 2:07 PM, Jiří Činčura <[hidden email]> wrote:

> If you are not using the server, then location of your embedded Firebird
> library.
>
> --
> Mgr. Jiří Činčura
> https://www.tabsoverspaces.com/
>
>
> On Thu, Mar 16, 2017, at 16:04, Clyde Eisenbeis wrote:
>> t) I've tried FbConnection.CreateDatabase ... using info from
>> StackOverflow:
>>
>>     int pageSize = 4096;
>>     bool forcedWrites = true;
>>     bool overwrite = false;
>>     var connectionString = new FbConnectionStringBuilder
>>     {
>>         Database = stPathFilename,
>>         ServerType = FbServerType.Embedded,
>>         UserID = "SYSDBA",
>>         Password = "masterkey",
>>         ClientLibrary = "fbclient.dll"
>>     }.ToString();
>>     FbConnection.CreateDatabase(connectionString, pageSize,
>> forcedWrites, overwrite);
>>
>> I had presumed this is standard, except for the stPathFilename.
>>
>> However, this code throughs an exception ... complains about
>> fbclient.dll.  I'm not sure what to use for Client Library.
>>
>> On Wed, Mar 15, 2017 at 1:54 PM, Jiří Činčura <[hidden email]> wrote:
>> >> FirebirdSql.Data.FirebirdClient.5.8.0 subdir ... with Firebird .dll's.
>> >
>> > To be precise, it's provider, not Firebird.
>> >
>> >> 1) Was the the correct procedure?
>> >
>> > Yes.
>> >
>> >> 2) How do I create a Firebird database file? ... as I did with SQLite
>> >> ... System.Data.SQLite.SQLiteConnection.CreateFile(stPathFilename)
>> >> where the filename ends with .sqlite.
>> >
>> > FbConnection.CreateDatabase.
>> >
>> > --
>> > Mgr. Jiří Činčura
>> > https://www.tabsoverspaces.com/
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> > _______________________________________________
>> > Firebird-net-provider mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Firebird-net-provider mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Firebird-net-provider mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Wolfgang Riedmann
Hi,

these helped me:

https://blog.cincura.net/224165-firebird-embedded-and-net/
http://stackoverflow.com/questions/8725546/how-to-create-an-embedded-database-using-firebird-in-c-sharp
http://stackoverflow.com/questions/16354712/how-to-programmatically-create-firebird-database

I have this working, but my language (X#) would not help you too much:

        FBConnection.CreateDatabase( cConnString, false )

Where FBConnection is

public sealed class FirebirdSql.Data.FirebirdClient.FbConnection inherit DbConnection implements Icloneable

Wolfgang
       
--
-- Wolfgang Riedmann
-- Riedmann GmbH - srl.
-- Individuelle EDV-Lösungen - Soluzioni informatiche personalizzate
-- I-39012 Meran, Postgranz 16b
-- Telefon +39 0473 201 239
-- http://www.riedmann.it - [hidden email]

-----Ursprüngliche Nachricht-----
Von: Clyde Eisenbeis [mailto:[hidden email]]
Gesendet: Freitag, 17. März 2017 17:26
An: For users and developers of the Firebird .NET providers
Betreff: Re: [Firebird-net-provider] [firebird net] Install Firebird / Create Database File

I used "FirebirdSql.Data.FirebirdClient.dll" ... which is located in my Debug subdir.

The exception is "Unable to find an entry point named 'isc_create_database' in DLL 'FirebirdSql.Data.FirebirdClient.dll".

On Thu, Mar 16, 2017 at 2:07 PM, Jiří Činčura <[hidden email]> wrote:

> If you are not using the server, then location of your embedded
> Firebird library.
>
> --
> Mgr. Jiří Činčura
> https://www.tabsoverspaces.com/
>
>
> On Thu, Mar 16, 2017, at 16:04, Clyde Eisenbeis wrote:
>> t) I've tried FbConnection.CreateDatabase ... using info from
>> StackOverflow:
>>
>>     int pageSize = 4096;
>>     bool forcedWrites = true;
>>     bool overwrite = false;
>>     var connectionString = new FbConnectionStringBuilder
>>     {
>>         Database = stPathFilename,
>>         ServerType = FbServerType.Embedded,
>>         UserID = "SYSDBA",
>>         Password = "masterkey",
>>         ClientLibrary = "fbclient.dll"
>>     }.ToString();
>>     FbConnection.CreateDatabase(connectionString, pageSize,
>> forcedWrites, overwrite);
>>
>> I had presumed this is standard, except for the stPathFilename.
>>
>> However, this code throughs an exception ... complains about
>> fbclient.dll.  I'm not sure what to use for Client Library.
>>
>> On Wed, Mar 15, 2017 at 1:54 PM, Jiří Činčura <[hidden email]> wrote:
>> >> FirebirdSql.Data.FirebirdClient.5.8.0 subdir ... with Firebird .dll's.
>> >
>> > To be precise, it's provider, not Firebird.
>> >
>> >> 1) Was the the correct procedure?
>> >
>> > Yes.
>> >
>> >> 2) How do I create a Firebird database file? ... as I did with
>> >> SQLite ...
>> >> System.Data.SQLite.SQLiteConnection.CreateFile(stPathFilename)
>> >> where the filename ends with .sqlite.
>> >
>> > FbConnection.CreateDatabase.
>> >
>> > --
>> > Mgr. Jiří Činčura
>> > https://www.tabsoverspaces.com/
>> >
>> >
>> > -------------------------------------------------------------------
>> > ----------- Check out the vibrant tech community on one of the
>> > world's most engaging tech sites, Slashdot.org!
>> > http://sdm.link/slashdot 
>> > _______________________________________________
>> > Firebird-net-provider mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>>
>>
>> ---------------------------------------------------------------------
>> --------- Check out the vibrant tech community on one of the world's
>> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot 
>> _______________________________________________
>> Firebird-net-provider mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>
>
> ----------------------------------------------------------------------
> -------- Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot 
> _______________________________________________
> Firebird-net-provider mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Mark Rotteveel-2
In reply to this post by Clyde Eisenbeis
On 2017-03-17 17:26, Clyde Eisenbeis wrote:
> I used "FirebirdSql.Data.FirebirdClient.dll" ... which is located in
> my Debug subdir.
>
> The exception is "Unable to find an entry point named
> 'isc_create_database' in DLL 'FirebirdSql.Data.FirebirdClient.dll".

You are missing a crucial point, the Firebird ADO.net provider is not
like Sqlite, it is **not** a Firebird server, it is only a client to
connect to a Firebird server, by default through a pure C#
implementation, alternatively using the native client or to an embedded
server.

The first option has no dependencies, but the second and third option
have native dependencies that you need to provide yourself (it is not
part of the FirebirdSql.Data.FirebirdClient). For native you need
fbclient.dll, for Firebird embedded you need Firebird embedded: for
Firebird 2.5 and earlier: fbembed.dll and dependencies, for Firebird 3
fbclient.dll + engine12.dll and dependencies.

If you want to use Firebird embedded, you need to put it in the same
folder as your application (or at least on the search path).

> On Thu, Mar 16, 2017 at 2:07 PM, Jiří Činčura <[hidden email]> wrote:
>> If you are not using the server, then location of your embedded
>> Firebird
>> library.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Clyde Eisenbeis
I clearly misunderstood.

To be certain I understand the terminology, an embedded server is one
that is accessible via the Internet?

I do want this database to eventually be accessible via the Internet.

I know which tables I want ... and which fields I want in each table.

By dependencies, does that mean table names, field names, passwords, sizes?

How do I create, or download, the Firebird embedded server?

How do I create this database?

On Fri, Mar 17, 2017 at 1:51 PM, Mark Rotteveel <[hidden email]> wrote:

> On 2017-03-17 17:26, Clyde Eisenbeis wrote:
>> I used "FirebirdSql.Data.FirebirdClient.dll" ... which is located in
>> my Debug subdir.
>>
>> The exception is "Unable to find an entry point named
>> 'isc_create_database' in DLL 'FirebirdSql.Data.FirebirdClient.dll".
>
> You are missing a crucial point, the Firebird ADO.net provider is not
> like Sqlite, it is **not** a Firebird server, it is only a client to
> connect to a Firebird server, by default through a pure C#
> implementation, alternatively using the native client or to an embedded
> server.
>
> The first option has no dependencies, but the second and third option
> have native dependencies that you need to provide yourself (it is not
> part of the FirebirdSql.Data.FirebirdClient).

> For native you need
> fbclient.dll, for Firebird embedded you need Firebird embedded: for
> Firebird 2.5 and earlier: fbembed.dll and dependencies, for Firebird 3
> fbclient.dll + engine12.dll and dependencies.
>
> If you want to use Firebird embedded, you need to put it in the same
> folder as your application (or at least on the search path).
>
>> On Thu, Mar 16, 2017 at 2:07 PM, Jiří Činčura <[hidden email]> wrote:
>>> If you are not using the server, then location of your embedded
>>> Firebird
>>> library.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Firebird-net-provider mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Mark Rotteveel-2
On 2017-03-17 20:16, Clyde Eisenbeis wrote:
> I clearly misunderstood.
>
> To be certain I understand the terminology, an embedded server is one
> that is accessible via the Internet?

No, Firebird Embedded is a (native) client API that directly accesses a
Firebird database engine in the same process, it does not open ports
that make the database server externally accessible.

As a simplification, a normal Firebird server is a component that
listens on the network (eg through TCP/IP) and accesses the database
engine. When an application access this server through the native client
API, this API translates the calls to the (TCP/IP) wire protocol, and
the server-side translates this back to native calls that go to the
database engine.

On the other hand in Firebird embedded, the network part is skipped, so
the native client access goes directly to the database engine.

> I do want this database to eventually be accessible via the Internet.

A Firebird Embedded is not network accessible.

> I know which tables I want ... and which fields I want in each table.
>
> By dependencies, does that mean table names, field names, passwords,
> sizes?

No, by dependencies I mean other files (dlls) that are necessary for the
Firebird database engine to run inside your C# process.

> How do I create, or download, the Firebird embedded server?
>
> How do I create this database?

As I said on stack overflow, I'll try to post a more complete answer
later this weekend. Also check the other answer posted recently, the
links in that mail handle some older versions, but should still apply in
general.

Mark

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Mark Rotteveel-2
On 17-3-2017 20:38, Mark Rotteveel wrote:
> As I said on stack overflow, I'll try to post a more complete answer
> later this weekend. Also check the other answer posted recently, the
> links in that mail handle some older versions, but should still apply in
> general.

I have posted on answer on Stack Overflow:
http://stackoverflow.com/a/42872385/466862

I hope it helps.

Mark
--
Mark Rotteveel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Clyde Eisenbeis
Mark,

I'm not sure how to reply via StackOverflow, so I'll email.

Thanks!  Your description creates an .fdb file. (I think .fdb is the
correct format acronym).

1) The filename was zzFirebirdTest.fdb.  The end result is
ZZFIREBIRDTEST.FDB.  How do I keep TitleCase for the name?

2) UserID = "SYSDBA", Password = "masterkey".  I presume there is no
risk in using anything I want.  Are they case sensitive?

3) Is the pageSize = 4096, a good common practice?

4) I'm struggling to find details about FbConnection.CreateDatabase on
the Firebird Document site.

Apparently the order is ... connection details (string), page size
(int), force writes (bool), overwrite (bool).

The connection string has reserved words, Database, ServerType, etc.

Is there a site that clarifies all of the reserved words / options /
defaults?  I'd like to document this info while it is still fresh in
my mind ... for future projects.


On Sat, Mar 18, 2017 at 4:07 AM, Mark Rotteveel <[hidden email]> wrote:

> On 17-3-2017 20:38, Mark Rotteveel wrote:
>> As I said on stack overflow, I'll try to post a more complete answer
>> later this weekend. Also check the other answer posted recently, the
>> links in that mail handle some older versions, but should still apply in
>> general.
>
> I have posted on answer on Stack Overflow:
> http://stackoverflow.com/a/42872385/466862
>
> I hope it helps.
>
> Mark
> --
> Mark Rotteveel
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Firebird-net-provider mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Jiří Činčura-2
> 4) I'm struggling to find details about FbConnection.CreateDatabase on
> the Firebird Document site.
>
> Apparently the order is ... connection details (string), page size
> (int), force writes (bool), overwrite (bool).

https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/blob/master/Provider/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnection.cs#L64
 
> The connection string has reserved words, Database, ServerType, etc.
>
> Is there a site that clarifies all of the reserved words / options /
> defaults?  I'd like to document this info while it is still fresh in
> my mind ... for future projects.

https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/blob/master/Provider/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnectionString.cs#L88

--
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Mark Rotteveel-2
In reply to this post by Clyde Eisenbeis
On 18-3-2017 16:21, Clyde Eisenbeis wrote:
> Mark,
>
> I'm not sure how to reply via StackOverflow, so I'll email.

Here is fine.

> Thanks!  Your description creates an .fdb file. (I think .fdb is the
> correct format acronym).

You can choose whatever you want for the file extension, but fdb is
indeed to common choice.

> 1) The filename was zzFirebirdTest.fdb.  The end result is
> ZZFIREBIRDTEST.FDB.  How do I keep TitleCase for the name?

Unfortunately there is no way, Firebird internally uppercases the
filename on Windows. If you really want to preserve case, you would
first need to create the database and then rename it.

> 2) UserID = "SYSDBA", Password = "masterkey".  I presume there is no
> risk in using anything I want.  Are they case sensitive?

Firebird Embedded on windows does not check for username and password,
so you can leave them out. For a normal Firebird server, username is
case insensitive, but password - of course - is case sensitive.

> 3) Is the pageSize = 4096, a good common practice?

It depends, 4kb is common, but the max is 16kb for current Firebird
versions. A larger page size allows for larger index keys, other than
that it depends: large pages means more records fit on a single page,
and as buffers/caches are defined in pages, you'll have more data in
cache, on the other hand storing blobs can have more space overhead:
you'll need less pages per blob, but say you store blob is around 16KB,
then you need 5 pages of 4KB and you will waste +/- 3500 - 400 bytes
because it only needs a few bytes (+ bytes for the page header) of the
last page, while with a 16KB, you'll need 2 pages of 16KB and waste
about 16000 bytes.

> 4) I'm struggling to find details about FbConnection.CreateDatabase on
> the Firebird Document site.

You'd need to ask Jiri who maintains the project. The documentation on
the Firebird ADO.net provider is rather sparse in my opinion, but you
can always check the source:
https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient

> Apparently the order is ... connection details (string), page size
> (int), force writes (bool), overwrite (bool).

public static void CreateDatabase(string connectionString, int pageSize
= 4096, bool forcedWrites = true, bool overwrite = false)

> The connection string has reserved words, Database, ServerType, etc.
>
> Is there a site that clarifies all of the reserved words / options /
> defaults?  I'd like to document this info while it is still fresh in
> my mind ... for future projects.

See the Description annotations on FbConnectionStringBuilder

https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/blob/master/Provider/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnectionStringBuilder.cs

Mark
--
Mark Rotteveel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Jiří Činčura-2
> Firebird Embedded on windows does not check for username and password,
> so you can leave them out. For a normal Firebird server, username is
> case insensitive, but password - of course - is case sensitive.

But the grants are still followed. So username/role is important,
password not much.

--
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Mark Rotteveel-2
On 19-3-2017 11:56, Jiří Činčura wrote:
>> Firebird Embedded on windows does not check for username and password,
>> so you can leave them out. For a normal Firebird server, username is
>> case insensitive, but password - of course - is case sensitive.
>
> But the grants are still followed. So username/role is important,
> password not much.
>

You are right, forgot about that :)

--
Mark Rotteveel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [firebird net] Install Firebird / Create Database File

Clyde Eisenbeis
1) The filename was zzFirebirdTest.fdb.  The end result is
ZZFIREBIRDTEST.FDB.

Here is solution converting the UPPERCASE back to the original:

    string stPATHFILENAME = stPathFilename.ToUpper();
    System.IO.File.Move(@stPATHFILENAME, @stPathFilename);

On Sun, Mar 19, 2017 at 6:07 AM, Mark Rotteveel <[hidden email]> wrote:

> On 19-3-2017 11:56, Jiří Činčura wrote:
>>> Firebird Embedded on windows does not check for username and password,
>>> so you can leave them out. For a normal Firebird server, username is
>>> case insensitive, but password - of course - is case sensitive.
>>
>> But the grants are still followed. So username/role is important,
>> password not much.
>>
>
> You are right, forgot about that :)
>
> --
> Mark Rotteveel
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Firebird-net-provider mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Loading...