Subject Crazy IBODataset states
Author rodbracher
Hi
below are accurate reported states of my TIBODatabase connection
status using ConnectinStatus and VerifyConnection. I am finding it
impossible to tell if my database is actually connected by means of a
status. Is running an arbitary query the best way to check your
database is connected? If result do you do `real' stuff otherwise
(on isc error on query) assume the database is not connected? If I
did get an error do I try and connect the database again AND run the
arbitary query again?

TIBODataset = DB

DB.ConnectionStatus = DB_CS

DB.VerifyConnection = DB_VC

I start the app (DB.Connected = false)

DB_CS = csDisconnected
DB_VC = True (Connected)

I then go DB.Connected := true;

DB_CS = csConnected
DB_VC = True

I now pull out the newtowrk cable on my PC

DB_CS = csConnected
DB_VC = False

I run a query – query returns error – the above status is the same.

I plug my network cable back in – above status the same

I run a query – same error (could not connected to host) – above
status the same.

I ForceDisconnect

DB_CS = csDisconnected
DB_VC = True !!!!

I DB.Connect = true

DB_CS = csConnected
DB_VC = True

OK –if you think at this point things are a little unpredictable

Now DB.ForceDisconnecct

DB_CS = csDisconnected
DB_VC = True

Now pull out the network cable

DB_CS = csDisconnected
DB_VC = True

The EXACT opposite staus situation the last time I had no network
connection.