[program-l] Re: VB6: Connection Object

  • From: "Corbett, James" <James.Corbett@xxxxxxxxxxxxxxx>
  • To: "'program-l@xxxxxxxxxxxxx'" <program-l@xxxxxxxxxxxxx>
  • Date: Wed, 7 Sep 2005 06:50:06 -0400

Mark:

Well here is the situation. I have a primary application and database, a
secondary application and a copy of the primary database connected to the
primary application.

The purpose of the secondary application and copy of the primary database is
in the event of a system failure.

When I load the primary app, it validates the remote secondary location and
if I get a true back then it copies it's primary database to the secondary
location and opens a second ADODB object.

If we lose the primary system, we can fire up the secondary application and
continue on using the primary backup as if there was no issue.

When I write to the primary db after the secondary is copied and open I
always check to see if the secondary is still with us. If yes (assumed) then
I write to both files at or near the same time.

The trouble is that I check the state of the secondary system with
secondary.state. If it returns 1 then I have always assumed that the
secondary ADODB object is viable therefore I can write to it. However, I can
absolutely confirm that my data is written to the primary but the secondary
is not updated although the secondary object.state property has returned 1.

Hmmm, a we bit confused and bewildered.

Jim 

-----Original Message-----
From: Mark Long [mailto:Mark.Long@xxxxxxxxxxxxx]
Sent: September 6, 2005 12:09 PM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: VB6: Connection Object


ADO tracks the state internally.

Jim, what makes you think that the database may have gone away unexpectedly?

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx]
On Behalf Of David Lant
Sent: 06 September 2005 17:08
To: 'program-l@xxxxxxxxxxxxx'
Subject: [program-l] Re: VB6: Connection Object

Hi Jim,

One would have thought that it checks the actual connection to the database,
as you can use it not only to find out if the connection is open or closed,
but what it is actually doing at the time.  E.g. you can compare the State
property against the adStateOpen, adStateClosed, adStateExecuting,
adStateFetching and adStateConnecting constants.

David Lant

I.T. Consultant 
Consultancy & Development
ICT Services
Tel: (01392) 382464

Devon County Council accepts no legal responsibility for the contents of
this message. The views expressed do not reflect those of Devon County
Council.


-----Original Message-----
From: Corbett, James [mailto:James.Corbett@xxxxxxxxxxxxxxx] 
Sent: 06 September 2005 16:56
To: Program-L (E-mail)
Subject: [program-l] VB6: Connection Object


Hello all:

I have the need to frequently check my ADO Connection object for viability.
If I use the Object.State property does that actually check the connection
to the database or simply the existance of the object in memory?

Jim 



James M. Corbett

(613) 941-8303 | facsimile / télécopieur 613 941-8720 | TTY/ATS
1-800-665-0354 James.Corbett@xxxxxxxxxxxxxxx IT Programmer/Analyst | GST/HST
Division | Information Technology Branch Programmeur/Analyste en technologie
de l'information | Division de la TPS/TVH | Direction générale de
l'informatique Canada Revenue Agency | 875 Heron Rd., Ottawa, ON K1A 0L5 
Agence du revenu du Canada | 875 Ch. Heron, Ottawa ON K1A 0L5 Government of
Canada | Gouvernement du Canada

"The following Ha Ha is not for amusement, but an expression of contempt...
Ha Ha!"

Nelson Mudge

Now this is not the end. It is not even the beginning of the end. but it is,
perhaps, the end of the beginning."

Winston Churchill


** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: