Report Timeout - how to change timeout parameter

K

kubik

Hello

In my ADP (on Sql 2000) i have long time running report. In my office
everything is ok but when I deploy application to the workstations in
my customer office there is timeout error. As I know I shuld change
"connection timeout" and "general timeout" properties of my
application. The problem is that when I change this in File-
Connection menu it is useless becouse during logging in to
application I change (in code) currentproject.connection reading
parameters from
txt file. So I decided to set
CurrentProject.Connection.ConnectionTimeout = 300 before I connect.
Then I have error "method 'connection' of object '_currentProject'
failed". So I triet to set this after I open connection - then I have
error "3705 operation is not allowed when the object is opened."
What should I do ?

I hope everything is clear (my english is poor)
Kubik
 
S

Sylvain Lafontaine

It's not the .ConnectionTimeOut but the .CommandTimeOut property that you
must change to affect the maximum execution length time. However, this
property is not really a property of the connection object but of the
command object and is inherited when a connection object opens or creates a
command object to execute a command. (Even when you directly call the
execute method of the connection object, the execute command is processed
via a command object; transparently created, used and destroyed by the
connection object.)

The problem is that ADP uses three and sometimes a fourth connection objects
to manipulate the database. The currentproject.connection is only the main
connection object used to display the objects in the database window and to
set/retrieve various properties.

I don't know how to set the command timeout using the connection string.
You can try various combinations but I'm not sure if you will find one that
will work.

In your case, maybe you could use the ADO objects to first build the results
for your report in a special table(s) and the create your report from it.
 
K

kubik

I don't know how to set the command timeout using the connection string.
You can try various combinations but I'm not sure if you will find one that
will work.
In your case, maybe you could use the ADO objects to first build the results
for your report in a special table(s) and the create your report from it.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)

Problem Resolved.
I set in file->connection general timout to 0 and in code set
Application.SetOption "OLE/DDE Timeout (sec)", 300" and it started to
work. Strange. When I debug the commandtimeout is 30 but it looks like
this is not probem. So this ole/dde seems to be most important. Maybe
I will meet the problem again in the future in other functionalites -
for now is ok.

Best regards
Kubig
 
S

Sylvain Lafontaine

I set in file->connection general timout to 0 and in code set
Application.SetOption "OLE/DDE Timeout (sec)", 300" and it started to
work. Strange. When I debug the commandtimeout is 30 but it looks like
this is not probem. So this ole/dde seems to be most important. Maybe
I will meet the problem again in the future in other functionalites -

Oh, from your OP, I was thinking that you've already tried to change these
values but that there were still not working after changing the connection
string of the ADP project in code.

Second, about the command timeout value of 30, I don't know from where you
get this value in debug mode but if it's from the CurrentProject.Connection
object, then it's worthless because ADP use other connection objects to
read/update the data.

Finally, in your case, it's also not clear if the generation of the report
take longer on the customer office than on your own office and if you are
using the same server or not in both cases. If the time taken to generate
the report is not the same in both cases, then maybe you have some execution
plan, statistic or indexes issues.
 
R

rajko

kubik said:
Hello

In my ADP (on Sql 2000) i have long time running report. In my office
everything is ok but when I deploy application to the workstations in
my customer office there is timeout error. As I know I shuld change
"connection timeout" and "general timeout" properties of my
application. The problem is that when I change this in File-
application I change (in code) currentproject.connection reading
parameters from
txt file. So I decided to set
CurrentProject.Connection.ConnectionTimeout = 300 before I connect.
Then I have error "method 'connection' of object '_currentProject'
failed". So I triet to set this after I open connection - then I have
error "3705 operation is not allowed when the object is opened."
What should I do ?

I hope everything is clear (my english is poor)
Kubik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top