
run time error: timeout expired
Increase the timeout value.
Depending on how you are retrieving the data, both the adodb.command and
connection objects have commandtimeout properties. These are there for YOUR
benefit. You set these values to the number of seconds that ado should wait
before abandoning a command. By default this is 30 seconds, so obviously if
your query takes your database longer than 30 seconds to put together, you
get the timeout. The amout of time taken to complete a query depends on a
number of things including network traffic, how busy the database is etc.
You can set these values to zero to never timeout, but if you have an error
in your sql, you wont ever get the timout.
HTH
Quote:
> when I open recordset sometimes I get error "timeout expired". My SQL
table
> has more than 1,000,000 records, so it takes time. How can I avoid this
> error?