|
 |
access thread: Timeout Expired when running a stored procedure on a report
Message #1 by "Michael Mitchell" <michael@m...> on Tue, 11 Mar 2003 18:15:38
|
|
I am using Access 2000 (ADP) and SQL7. I have a stored procedure that
takes a long time to run. When I use it as the record source on a report
I get "Timeout Expired"
I think that I need to set the Timeout Expired=0 but do not know how to do
it for the specific report or specific stored procedure or what?
How do I do this?
Mitch
Message #2 by "Darin Wray" <darin@r...> on Tue, 11 Mar 2003 12:10:52 -0600
|
|
Here's an example of something I had to do on the command button that runs a
similar "lengthy" procedure for me.
Dim cnn As ADODB.Connection
Dim cmd As ADODB.Command
Dim lngRowsAffected As Long
Set cnn = CurrentProject.Connection
Set cmd = New ADODB.Command
Set cmd.ActiveConnection = cnn
cmd.CommandTimeout = 60
cmd.CommandText = "EXEC spStoredProcedure"
cmd.Execute RecordsAffected : = lngRowsAffected
note the line cmd.CommandTimeout = 60
that sets the timeout on this particular ADO procedure to 60 seconds.
you might want to search for CommandTimeout in the Object Browser for more
info.
HTH,
Darin
----- Original Message -----
From: "Michael Mitchell" <michael@m...>
To: "Access" <access@p...>
Sent: Tuesday, March 11, 2003 6:15 PM
Subject: [access] Timeout Expired when running a stored procedure on a
report
> I am using Access 2000 (ADP) and SQL7. I have a stored procedure that
> takes a long time to run. When I use it as the record source on a report
> I get "Timeout Expired"
>
> I think that I need to set the Timeout Expired=0 but do not know how to do
> it for the specific report or specific stored procedure or what?
>
> How do I do this?
>
> Mitch
>
|
|
 |