Solved

Determine if ADO Connection is open

Posted on 2002-07-17
2
430 Views
Last Modified: 2008-02-26
I thought there was an item in the ADO Connection
Properties collection that would tell me if a connection is currently open, but I can't find it.
I'm using VB6, ADO 2.6 and SQL Server 2000.

Any help is appreciated.

Phil
0
Comment
Question by:ppastor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
Nevering earned 50 total points
ID: 7161303
The Connection's State property will tell you that.
0
 

Author Comment

by:ppastor
ID: 7161848
An "Excellent" answer would have included information regarding the ObjectStateEnum (eg. adStateOpen = 1, so If oConnection.State = adStateOpen Then ' Connection is open).
Thanks for your help !
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question