IIS - half dead half alive.

lankia

Member
Nov 29, 2000
166
0
0
I am using WinXP Pro and running IIS 5.1. I must admit that I am very new to IIS and ASP programming. I use Dreamweaver UltraDev for my ASP programming. The problem I am having with my IIS server is that sometimes it executes my ASP pages without a hitch, but at other times, I get the following error:

"Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access 97 Driver] Couldn't use '(unknown)'; file already in use."

The annoying part is, of course, realizing that my server works 50% of the time. Usually when it doesn't work, I could get it to work by waiting a little while (5 mins), or restarting IIS. Has anyone had a similar problem in the past and therefore known a fix for it??

Any help would be much appreciated.

-lankia
 

RedFox1

Senior member
Aug 22, 2000
587
0
76
You should probably make sure that your scripts close their database connections after they're finished with them. That could be the problem.

-Russ
 

bevancoleman

Golden Member
Jun 24, 2001
1,080
0
0
Sounds like the database is being locked.

* The database may be opened in an exclusive mode, try opening restricting the opening rights.

Connection


Recordset;
Keyset should be adOpenForwardOnly for scaling through the database or one of the others for more general access
LockType type adLockReadOnly (read only) or adLockOptimistic (if you want to write).

* Make sure the database is being closed by the ASP. If you ASP crashes this may also leave the database connection open.
* The database isn't open in Access or other application


Also I would consider upgrading to an Access 2k database, if you arn't using ADO then I would as it's nicer to use and if you are using ADO with a '97 db then you are putting a performance hit onto your site as ADO uses a compatibility mode to use '97.

Of course upgrading to a propper SQL server is an even better idea, there is a cut-down version of SQL server included with many MS apps which should to the trick (it only allows 5 connections, so make sure you close them!!). Also consider some of the OpenSource databases such as PostgreSQL or MySQL.

 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
> ODBC Microsoft Access 97 Driver

I didn't think the drivers that old where multithreaded and safe for ASP work, cany you update your db/drivers to JET 4.0?
Bill
 

lankia

Member
Nov 29, 2000
166
0
0
Thanks for all the replies so far. As I am new to both IIS and UltraDev, I am not exactly following each of your suggestions. Is there anyway I can check if a connection was or wasn't closed? I check the HMTL/ASP code and did see that Dreamweaver closes the DB connection. And, how do I upgrade the db/jet driver to 4.0?

-lankia
 

calpha

Golden Member
Mar 7, 2001
1,287
0
0
God, it's been so long since i"ve used JET, I can't remember if there's a property or not to show the state.

But there is a DAO.Database.Close Method that will work even if you're already closed.

Setting the object to nothing is what you should do next as good practice btw.

Data downloads can be found @ www.microsoft.com/data

MDAC 2.5 included the Jet Updates, and was installed w/ Windows 2000 automatically.

MDAC 2.6 SP1 did not include JET, and was a separate download from that point on.
 

bot2600

Platinum Member
May 18, 2001
2,075
0
76
Actually if I remember correctly, JET 4.0 is for Access 2000, Jet 3.5 is for Access 97, and I agree with calpha, if you set the record set object = Nothing it will close and destroy the record set and allow you to reuse that connection.

Bot