Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default Check if ADO connection open

Is there a way to check if an ADO connection is open in VBA? I'm currently
using:

If VacConn.Open Then VacConn.Close

assuming, wrongly of course, that the ADODB Connection Open method would
return a boolean...
--
Adios,
Clay Harryman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Check if ADO connection open

Clay,

Try:

If VacConn.State = adStateOpen Then VacConn.Close


--
Hope that helps.

Vergel Adriano


"Clayman" wrote:

Is there a way to check if an ADO connection is open in VBA? I'm currently
using:

If VacConn.Open Then VacConn.Close

assuming, wrongly of course, that the ADODB Connection Open method would
return a boolean...
--
Adios,
Clay Harryman

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default Check if ADO connection open

Thank you! That did the trick.
--
Adios,
Clay Harryman


"Vergel Adriano" wrote:

Clay,

Try:

If VacConn.State = adStateOpen Then VacConn.Close


--
Hope that helps.

Vergel Adriano


"Clayman" wrote:

Is there a way to check if an ADO connection is open in VBA? I'm currently
using:

If VacConn.Open Then VacConn.Close

assuming, wrongly of course, that the ADODB Connection Open method would
return a boolean...
--
Adios,
Clay Harryman

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check for Internet connection Vikram[_4_] Excel Programming 3 June 16th 06 10:55 AM
How to check for an open network connection? vrk1 Excel Programming 0 June 20th 05 06:07 PM
How to check for an open Network connection in Excel VBA? vrk1 Excel Programming 0 June 18th 05 02:58 AM
Check for valid SQL server connection Robert W. King Excel Programming 1 September 8th 04 09:29 AM
Open a connection to dbf file ibeetb Excel Programming 0 July 19th 04 09:52 PM


All times are GMT +1. The time now is 10:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"