Personally, I prefer the use of the FbConnectionStringBuilder class, the
following works:

 

    FbConnectionStringBuilder cs = new FbConnectionStringBuilder();

    cs.ServerType = FbServerType.Embedded;

    cs.Database = fileName;

 

Calling ToString() on this returns:

 

    "Initial Catalog={fileName}; Server Type=Embedded"

 

Notice that you don't need to specify a user name/password - there is not
security in embedded mode. Also, you can use the text of the enumeration for
Server Type ("Embedded" is more readable than "1")

 

What is the error that you get? It could be a file system permissions thing.
Also remember that embedded mode acts like super server - meaing you cannot
open the same database file from different processes. This is important if
you're trying to run in embedded on a web farm or something (you basically
can't do it); it also proves problematic in the event of worker process
recycling in IIS6 (in fact, I wouldn't recommend embedded mode at all in a
website).

 

Dean.

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Andrew Chalk
Sent: Tuesday, 2 January 2007 12:56 pm
To: [email protected]
Subject: [Firebird-net-provider] Connection string for embedded firebird

 

Could someone give me or refer me to some example connection strings for the
embedded version of Firebird? My string below gets an error opening the
file.

 

<add key="DBConnectionString" value="Data Source=local; Charset=ASCII;
Database=D:\\WORK\\Database\\Firebird\\ABC.FDB; User Id=sysdba;
Password=masterkey; ServerType=1"/>

 

 

Many thanks.

 

__________________________________

         Communications Solutions



7000 Independence Pkwy., Ste. 160-227

Plano, TX 75025 USA

(972) 377-9074

www.magnacartasoftware.com

 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]

 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]

 <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED]

 

 

Attachment: image001.gif
Description: GIF image

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to