Subject Re: [firebird-support] Re: Select Top n ???
Author Daniel Rail
Hi,

At April 28, 2004, 06:08, adele_leroux wrote:

> We have solved the problem (sort of) and caused another. The
> database was registered incorrectly in IB Expert (using the
> Interbase client dll and not FB client dll). Thanks for your help
> and to Tim. The query select first... does now work in IB Expert,
> but not from our delphi application. We are using the Interbase
> components in Delphi, which I assume is the problem. Is there any
> possible way to fix this?

The IB Express components uses gds32.dll to connect. You can change
that in the IB Express source code(I don't know in which unit, because
I don't use them anymore). If your application development
requirements still requires IB and FB, then I would suggest to find a
more neutral approach where you can switch between both in
runtime(before establishing a connection). I don't know if there are
free components that do just that.

> The other problem we are facing now is that we cannot access the
> same database from IB Expert and our delphi application (either run
> or design time) at the same time. The error...
> Unsuccessful execution caused by a system error that precludes
> successful execution of subsequent statements.
> I/O error for file "C:\DB.FDB".
> Error while trying to open file.
> The process cannot access the file because it is being used by
> another process.

As Martijn said, what is happening here is that Interbase and Firebird
are trying to connect to the same database file and one is already
using it, depending on which connected first. The Superserver version
of IB and FB does put an exclusive read/write flag on the file, and
that the reason why you are seeing that error. Otherwise, the database
would become corrupted.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)