![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 02:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com