If you are using MS Access d/b: -

myDatabase.querytimeout = 10

or a connection object: -

myConnection.querytimeout = 10