You're sort of screwing the pooch unfortunately with an ACCESS connection and using a USP.
Honestly, there is a set limit to how long something can run before it times out with an access connection.
Even if you have timeout set to 999999 there's a max value, I forget what it is...
Ussually what I do is, cn.execute "exec usp_MySpName"
Where cn is the current connection for the database to the backend.
My suggestion to you -- if it's something that takes an extreme amount of time (example: 10 hours...) then you need to schedule a JOB on the server.
Additionally, I suggest you move away from Access and move towards a more friendly front end frame work. (.Net?) Continue to keep an Access FE for reports and what not -- I know people love their Access for reports...
Another thought, if it's a LONG job which exceeds the wait limit for the connection, you could use a TRIGGER instead of a sp. You can insert into a table, on insert run your sp. When the SP is done, have it change a value in the table. Have your app check the value in the table -- OR you can have your DB raise an ERROR to notify that the USP is finished.
This of course is not the prettiest of solutions.....
My suggestion: If it's a time issue, effecting your connection -- You need to invest in examing the performance inhibitors of the process and/or examining the process itself.
Randall Vollen
Meryl Lynch