Subject Re: [IBO] Updating master detail tables - 2nd post
Author Terry Black
Hi, I have 2 Delphi applications that are working on the one Firebird
database. Let me explain. The first application uses 3 tables
relationally linked to each other. It is a many to many relationship.
This application has been working well for 6 months. The second
application is my developmental application which uses the same firebird
database which is looking at adding records to the 3 tables. So I am
constantly changing and compiling the second developmental application.
At some stage it hangs and then fails to compile. Giving me the
'EIB_ConnectionError - Cannot change while connected'.
I can still use the original application which uses the same database.

If I rebooted the computer my developmental application would still not
compile. So this looked like there was something wrong with my code in
the developmental application. However, I find this morning that it
compiles easily. I have not changed anything since it was unable to
compile yesterday.

I am not sure what is happening. It looks like I opened a transaction
which for some reason would not close yesterday. This prevented my
developmental application opening the Firebird database. Today it is all
fine. I don't understand it.


Terry



>>> Daniel Rail <daniel@...> 31/05/2011 10:00 pm >>>
Hi,

At May-31-11, 4:26 AM, Svein Erling Tysvær wrote:

> I think she meant that she thinks you're doing something like:

> TIB_Connection1.Connect;
> TIB_Connection1.Username:=...

> and you cannot change username or password when you're already
> connected. Actually, I don't think it has to be username or password
> that is changing, I think it can also be that you try to change the
> name of the database, maybe even the name of a database belonging to
> a started transaction (at least I doubt it is possible to close a
> connection whilst its transaction is running).

> You have to find the exact place in your code that causes the
> error, this kind of showstoppers luckily tend to be relatively easy
> to locate (and easy to understand why gives this error once you find
the exact line).

It might also be that TIB_Connection.Connected := True at compile
time, and then trying to change the server and path at runtime.

--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Solutions Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)



Disclaimer: Unless explicitly attributed, the opinions expressed in this
email are those of the author only and do not represent the official
view of Northern Sydney Central Coast Health nor the New South Wales
Government.