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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Intermittent ODBC errors

Status
Not open for further replies.

Biff

Programmer
Mar 26, 2001
7
GB
I'm baffled and would really appreciate some help.

I am in the middle of designing a site using ASP and an access database as the datasource.

The site works fine on the Win98SE and PWS set-up that I have developed it on. However, once uploaded to my web host, who is running Win2K and IIS, I get intermittent ODBC errors.

There two errors that I get are as follows:

1. Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 3.

2. Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

ODBC driver does not support the requested properties.

Refreshing the page usually clears the errors and they won't appear again for a while (which suggets to me that this is not a problem with the code).

The access database I am using is an Access97 database, but I have also converted the database to Access2000 and get the same problem.

I have used both a DSN and a DSNless connection, but the problem pesists.

I've also tried running this locally on my Win2K machine using IIS, and it runs fine on that set-up.

Please, please make some suggestions as I have completely run out of ideas.

Thanks.

 
I have experienced a similar problem and I found that the problem was stemming from a server that was too loaded. I requested to be moved to another server and the problem stopped.
You may also want to request that the Access drivers be reinstalled, then reset your DSN ADODB connection.
Hope this helps
 
Thanks for such a quick response.

I will speak to my hosting company and see what they say.

In the meantime, does anyone have any other suggestions, or has Cirrus9 hit the nail on the head?

Thanks for any further help.
 
Dear Biff,

I too have had similar problems and, like Cirrus, it was because of busy servers. There were thousands of users on the same server, and a limit on the amount of concurrent database connections. At busy times of the day, all my database-driven pages fell over. Other ASP & HTML pages without any database connectivity continued to function.

Because your pages sometimes work and sometimes don't, I would strongly suspect network/server conditions. Do your pages run better at certain times of the day (say, 4am?)

Simon
 
I encountered exactly the same problem as this when I ported an ASP application from MS SQL Server to Access. The reason was because at the time I was very new to ASP and a very untidy programmer. I was not closing my Objects and setting them to nothing after I finished with them. Now maybe I am telling you something that you already know, but when you have finished with an object you should *always* tidy up with:

myObj.Close
sey myObj = Nothing

This frees up all the objects resources on the server, leaving those resources available for other objects. If you don't do this particularly with Access, which is essentially not a multi-thread database, it takes a while for it to tidy itself up. Hence when you refresh the page, everything works as normal.

Hope this helps.

G -GTM Solutions, Home of USITE-
-=
 
Thanks for all the help so far with this.

My first thought was that I may have forgotten to close a connection or a recordset object somewhere along the way, but I've already been back and checked the code and I hadn't missed it anywhere - thanks anyway Geee!

I'm waiting for a response from my web hosts, so I'll get back to you all if they aren't able to resolve my problems.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top