[program-l] Re: VB6: Connection Object

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

David:

Thanks very much but the issue aside from all of this is the certification
of other technologies! Currently in a micro environment we can use either
UDB2 or MS Access and nothing else. The certification process is lengthy and
if there isn't a need on a large scale then our architecture Steering
Committee will not give the approval for the certification process to begin.

It's sort of like "If it isn't needed then we don't certify it, so if it's
not certified obviously we don't need it" or as I like to say "If you stew
tomatoes like prunes, they taste more like potatoes then rhubarb does"!

Jim 

-----Original Message-----
From: David Lant [mailto:david.lant@xxxxxxxxxxxx]
Sent: September 7, 2005 7:59 AM
To: 'program-l@xxxxxxxxxxxxx'
Subject: [program-l] Re: VB6: Connection Object


Hi Jim,

MSDE is also free, and has the same concurrent user limitations as Access.
So it might be worth trying to sell the users that as an option, as it would
greatly enhance your features.  E.g. you could use SQL Server replication to
maintain your local and remote copies of the database, without having to
custom code your application to handle it.  It's not as straightforward as
that statement would imply, as I tend to find that "if it's easy to say,
it's hard to do."  But it is an alternative.

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: 07 September 2005 12:54
To: 'program-l@xxxxxxxxxxxxx'
Subject: [program-l] Re: VB6: Connection Object


Mark:

No need to be sorry mate... It is just one of those design considerations
against using Access. I have argued for the past four and a half years that
we need a better system but the clients always return to the fact that there
isn't a budget and so on. "Access is free so to speak"... Well this is
certainly a truism but free has a cost all of its own!

Jim 

-----Original Message-----
From: Mark Long [mailto:Mark.Long@xxxxxxxxxxxxx]
Sent: September 7, 2005 7:37 AM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: VB6: Connection Object


Well, I am certainly confused.

Unfortunately, this is one of those situations where there is no meaningful
answer, in a sense. Let's imagine that the connection object had a method
called IsServerReachable that returned true or false. Let us further imagine
that we had code a lot like this air code

If MyConn.IsServerReachable then
  ' great - I can write to the DB and there will be no error
  WriteToDatabase
End if

You will get errors on WriteToDatabase because the validity of the data has
a very short lifetime indeed. The server may have been fine one clock cycle
ago but be gone now. All that you could tell is that it was reachable last
time that you asked. 

The only way to ever be sure with these things is to use a transactional
system. I would suggest that MSMQ would not be overkill here. You might want
to check out ACID on MSDN.

I know that this seems like it is a lot of work but I don't know of a simple
and easy way of making a reliable failover system.

Sorry

Mark

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Corbett, James
Sent: 07 September 2005 11:50
To: 'program-l@xxxxxxxxxxxxx'
Subject: [program-l] Re: VB6: Connection Object

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
** 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: