P
Poppe
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!!
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!!