Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Connection in Access 97 timing out

Status
Not open for further replies.

warthog72

Programmer
Aug 13, 2003
42
US
The first time I open an ADO connection in Access 97, I get a timeout error after about 15 or 20 seconds. When the code halts on error, I can resume running and everything works as designed.

I've updated my MDAC to most the current. What else should I be checking?

I couldn't find a timeout setting for the connection, is there one?

What JET does Access 97 use and is there an update/patch for this?

Thanks in advance!
 
Bump...

Anyone every experience something like this?
 
That's really weird. A few questions:

1. What is your connect string?

2. What environment are you connecting from? Access? VB? Other?

3. Is this a local file (c:\) or a network share? Slow network?

4. Is anyone else using the database?

5. Can you open the file directly, i.e. doubleclick on file, without problems?

6. During this 10-15 second timeout phase, does an .LDB file appear?

7. Do you have permissions to open/modify/delete the file?
 
Foolio: Thanks for taking a look at this.

1. What is your connect string?
A:"provider=sqloledb;database=halo;uid=snewman;password=PWORD"

2. What environment are you connecting from? Access? VB? Other?
A: Access 97

3. Is this a local file (c:\) or a network share? Slow network?
A: Local File

4. Is anyone else using the database?
A: Not yet

5. Can you open the file directly, i.e. doubleclick on file, without problems?
A: Yes

6. During this 10-15 second timeout phase, does an .LDB file appear?
A: LDB already created - happens during testing

7. Do you have permissions to open/modify/delete the file?
A: Yes

In doing some research, Microsoft says link the table and open from the link - dont use a connection to do something easy and trivial, only when modifying/manipulating a lot of data. So...I created an ODBC connection, linked the table, and accessed the table directly.

It changes some of the dynamics but its working now. Now, the only time I use a connection is to ADD or EDIT, not to display data.

What do you think?
 
This is fine. Unfortunately with Access, a lot of thing's you SHOULD do are not necesarily beneficial when working 100% in the Access environment.

Like, for example, sitting in class (or reading a platform-independent database design book) you are told that the ultimate form of a database application is a n-tier system. The n-tier system is this: the user interface only interacts with the middle-tier (business logic), and the middle-tier interfaces with the actual database backend, and everything is object-oriented.

So when you fire up Access, you notice that a)they allow horrible things like linking directly to the tables, and b)the entire concept of 'bound forms', which tie directly to the data, totally destroys the middle-layer, and c)Access uses VBA and thus has limited object-oriented support, and d-z)things I haven't mentioned.


Basically what I'm saying is that Access, as a frontend, teaches a way of application development that doesn't necessarily mesh with more rigid models. So if you want to develop a more rigidly-controlled app, use VB or Java or whatever else (everything else)--the benefit of using Access as a frontend is directly tied to how much you use its 'inelegant' features.


Oh, and I'm absolutely dominating with the marine pistol in Halo. Don't think that escaped my attention.


Pete
 
Oh, and get the Office 97 service packs, and the JET 3.5 service packs. ADO isn't (wasn't?) well-supported at all in Access 97, so a driver update may totally do the trick.
 
I'll grab all service packs I can (including Jet 3.5) and see what happens.

You forgot one of the best reasons to use Access though.

It being idiot proof means only idiots can use it :) All my users are idiots.

WOAH!! kidding everyone, just kidding!!!

/ducks under flying monitor

Thanks again!
 
The default time out on an ADO connection is 30 seconds, I believe, or it could be 15. Assuming your connection is named cn.

cn.CommandTimeOut = 60 '- 60 seconds
cn.CommandTimeOut = 300 '- 5 minutes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top