What's the complete exception? My guess is that there is some sort of
permissions problem.

 

Are you using IIS5 or IIS6 (Windows 2000 or Windows Server 2003)?

 

For IIS5 you need to give the ASPNET account read/write permissions to the
database file. For IIS6 you need to give whatever account your Application
Pool is running as read/write permissions to the file.

 

Also, re: your last mail. You can run into problems if you have worker
process recycling turned on in IIS6, but IIS5 should be OK (though if you
ever upgrade to IIS6 in the future...)

 

The problem with worker process recycling is that when IIS6 recycles the
worker process, the old one hangs around while it finishes servicing current
requests. A new worker process is started to service any new requests. So
there is a (admittedly, short) period of time while there will be two
processes running. If the new worker process tries to open the database file
before the old one goes away, you'll get errors.

 

Dean.

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Andrew Chalk
Sent: Tuesday, 2 January 2007 2:30 pm
To: 'For users and developers of the Firebird .NET providers'
Subject: Re: [Firebird-net-provider] Connection string for embedded firebird

 

Here is the error reported by .Net:

 

I/O error for file CreateFile (open)
"D:\WORK\Logger\Database\Firebird\MCSCRE.FDB" Error while trying to open
file

 

However, no other process has the file open.

- A

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Dean Harding
Sent: Monday, January 01, 2007 8:09 PM
To: 'For users and developers of the Firebird .NET providers'
Subject: Re: [Firebird-net-provider] Connection string for embedded firebird

 

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: firebird-net-provider@lists.sourceforge.net
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
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to