Subject | Re: [IBO] Losing TIB_Connection whilst designing |
---|---|
Author | Helen Borrie |
Post date | 2003-02-19T11:34:49Z |
At 10:25 AM 19/02/2003 +0000, you wrote:
the database (names used here are for example only):
TIB_Connection, properties
Name property set to CN
Path property set to c:\data\MyDb.gdb
Protocol property set to cpLocal
DatabaseName property set to MyDb (thus overwriting the duplicated server +
path (path alone in the case of the local connection).
Then..
TIB_Transaction, properties
Name property set toTR1
IB_Connection property, select CN from the drop-down list
Then
TIB_Query, properties
Name set to QRY1
IB_Connection property, select CN
IB_Transaction property, select TR1
This all safely abstracts the query's relationship with the connection and
the transaction. *Don't* use the DatabaseName property. It is there for
VCL compatibility and may not fully abstract the object reference, as the
true object name does. Take care not to mix and match - some query objects
using DatabaseName while others use IB_Connection.
To avoid the blackouts, don't use cpLocal, use cpTCP_IP and Server
localhost, an arrangement known as "TCP/IP local loopback". Make sure
localhost is defined in your HOSTS file.
Helen
>HelloThis combination should persist, even if the client loses its connection to
>
>Using BCBv5p2, Win2kp2, IBO4.2H, with a local database
>
>For a few months now, I have had a TIB_Connection in a datamodule
>with Connected=true. Other forms/datamodules used this connection to
>set their query/cursor,transaction IB_Connection property.
>
>However, during the past week the TIB_Connection periodically sets
>it's Connected property to false, resulting in all my
>transactions\querys\cursors losing their IB_Connection property.
the database (names used here are for example only):
TIB_Connection, properties
Name property set to CN
Path property set to c:\data\MyDb.gdb
Protocol property set to cpLocal
DatabaseName property set to MyDb (thus overwriting the duplicated server +
path (path alone in the case of the local connection).
Then..
TIB_Transaction, properties
Name property set toTR1
IB_Connection property, select CN from the drop-down list
Then
TIB_Query, properties
Name set to QRY1
IB_Connection property, select CN
IB_Transaction property, select TR1
This all safely abstracts the query's relationship with the connection and
the transaction. *Don't* use the DatabaseName property. It is there for
VCL compatibility and may not fully abstract the object reference, as the
true object name does. Take care not to mix and match - some query objects
using DatabaseName while others use IB_Connection.
To avoid the blackouts, don't use cpLocal, use cpTCP_IP and Server
localhost, an arrangement known as "TCP/IP local loopback". Make sure
localhost is defined in your HOSTS file.
Helen