Tough one - Timeout doesn't work
Hi
I send data from Excel to database with ADO connection. Sometimes other users with other programs use the database, and reserve access. I need to define timeout parameter for the ADO connection, so it doesn't hang and wait forever if the database is in use by somebody else. I've tried several options: -------------- Dim conn As New ADODB.Connection conn.ConnectionTimeout = 5 conn.CommandTimeout = 5 Dim cmdSQLData As ADODB.Command Set cmdSQLData = New ADODB.Command cmdSQLData.CommandTimeout = 5 -------------- Nothing works. It doesn't give error after 5 seconds, but hangs and waits until the database access is released by another program. Please help!! |
All times are GMT +1. The time now is 12:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com