ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Collectiong data from SQL server / Repeat! (https://www.excelbanter.com/excel-programming/280702-collectiong-data-sql-server-repeat.html)

Sh0t2bts

Collectiong data from SQL server / Repeat!
 
Hi I am using an macro to collect data from an SQL server, the problem I
have is if the server is locked "usally by someone connecting using access"
Iget an error massage saying that the SQL server is locked please try again.

is there a way of capturing this error and getting the macro to run the last
step?


Cheers

Mark




Tushar Mehta

Collectiong data from SQL server / Repeat!
 
Usually, a SQL connection has a timeout associated with it. Can you
set the timout to a large number? Or, if you are sure you will
eventually connect, specify 'forever' as the timeout interval?

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Hi I am using an macro to collect data from an SQL server, the problem I
have is if the server is locked "usally by someone connecting using access"
Iget an error massage saying that the SQL server is locked please try again.

is there a way of capturing this error and getting the macro to run the last
step?


Cheers

Mark





Sh0t2bts

Collectiong data from SQL server / Repeat!
 
Hmmm

I don't state a timeout "time" so I am unsure, what tends to happen it it's
not a timeout but more of a bugger off this is locked / blocked try later.

I know that the guys who use access to connect cos they can't / don't know
hoe to use pass through queries are at fault but I have no way of stopping
them as it's there server :o(
Mark


"Tushar Mehta" wrote in message
om...
Usually, a SQL connection has a timeout associated with it. Can you
set the timout to a large number? Or, if you are sure you will
eventually connect, specify 'forever' as the timeout interval?

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Hi I am using an macro to collect data from an SQL server, the problem I
have is if the server is locked "usally by someone connecting using

access"
Iget an error massage saying that the SQL server is locked please try

again.

is there a way of capturing this error and getting the macro to run the

last
step?


Cheers

Mark








All times are GMT +1. The time now is 05:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com