Subject Re: [firebird-support] Re: permissions problem?
Author Helen Borrie
At 10:36 PM 5/11/2005 +0000, you wrote:
>user name and password were misconfigured. I don't get why I was
>getting the EInOutException--I thought my code was pretty
> try
> ldmRegSvc := TdmRegSvc.Create(nil);
> except
> on e: Exception do
> begin
> aErrorMsg := Format('Exception creating data module: %s [%s].',
>[E.Message, E.ClassName]);
> exit;
> end;
> end;
>The connection happens in the creation of the datamodule--I need to
>fix that. But I still don't understand why aErrorMsg returned a
>EInOutException. Any one explain what I should do better?

I have no idea what interface layer returns EInOutException (it's an
interface error, not a Firebird one); but it's probable that it reflects
an OS message returning a "Can't open file" error. The files that have to
be opened or created when the first user connects are the lock file, the
messages file, the log file, the security database file and of course the
database file itself.

If you did the default Windows install there shouldn't be any permissions
problems, since the Localsystem user is running the service and it has
higher fs powers than even the Administrator.

The name of your DM seems to suggest that it's reading the registry. Check
whether you actually have a Registry entry; if so, then check whether it's
consistent with the Firebird root directory and its subdirectories.

Of course, you will get an I/O error if another application has a lock on
any of Firebird's files (databases or other) at the time that first
connection request is made. I forget right now the name of the S2003
utility that runs when you open a file (something like "DiskShadow") but
it's been known to cause the same kind of startup problems as XP does with
its SystemRestore with DB files having the ".gdb" extension....

Above all, it might simply be a timing issue. NT platforms start up
services in their own sweet time and order; if you are passing a
connection request before any needed services have been started, it's
feasible that you could get an I/O exception from the OS. If this is the
cause, you might need to put your connection routine inside a retry loop.