Tough one - Timeout doesn't work

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top