CurrentProject.Connection.CommandTimeout - need pro's assistance

G

Guest

Hi,

I have an adp application that uses a very large DB (SQL server 2000).
The tables are large and querys might take more than 30 sec to complete.
My problem is that the CurrentProject.Connection.CommandTimeout is read only
and cannot be changed using VB (no idea why).
I saw a few examples how to override this by creating an ADO.Command object
or by creating a different connection and it's working OK - The problem is
that all the forms & recordsets in the application uses this connection by
default (like listboxes, combos, forms, reports etc) and it would be wrong to
write code for each one of them seperately.
I also have indexes all over the tables and have a procedure to rebuild them
periodically to keep the db in top shape - but sometimes the network is
causing the delay.

There must be a way to change this setting - so it would affect the entire
application.

Please help
 
S

Sylvain Lafontaine

Two possibilities; I don't remember which one you need to change:

1) Try setting the OLE/DDE timeout under the advanced tab in the Options
dialog window to 0 or to a greater value than 300.

2) In the File Connection property, there is also a General Timeout that you
can set to 0 or to a greater value than 300 but I don't know is this is the
good one.

Changing CurrentProject.Connection.CommandTimeout will serve nothing because
ADP opens three connections (and sometimes a fourth) and this one is mainly
used for listing the objects in the Database window; if I remember
correctly.

The newsgroup for ADP is m.p.a.adp.sqlserver.
 
G

Guest

Hi,

Thanx for the response - but how can i set these parameters using VB ?
I'm developing a client application that runs on xp runtime - and I don't
want the client to mess with these parameters.
 
S

Sylvain Lafontaine

I don't know. The first thing to do would be to find if one these two is
the good one and is yes, to find if it's part of the ADP file. To my
knowledge, the one with the connection should follow and the other one (in
the options) is probably a system wide setting that maybe can be changed in
the registry as part of your installation procedure.

If I remember correctly, with MDB, you can create different profil for each
application but for ADP, I don't know. You should look into the
documentation of your installation procedure to see if you can edit the
registry or create a profil during the installation.
 

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