Solved

ASP Question

Posted on 1998-08-20
18
168 Views
Last Modified: 2013-12-25
I'm just begining to have a look at ASP, but don't seem to be able to get very far.  I'm using Visual InterDev.  I've set up an access database on a web server and an appropriate DSN.  I've used the wizard to create list and form ASP pages.  But when I preview these in a browser I get:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access 97 Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.

/mbw9/testList.asp, line 282

Any idea.  I'll only award the full points (and there are a lot of them) to an answer that clearly helps me to resolve the problem.

Many thanks

Martin
0
Comment
Question by:martinbw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 5
  • +2
18 Comments
 
LVL 10

Expert Comment

by:MasseyM
ID: 1828223
Could you please post you code so I can take a look at it?

In the mean time, make sure your database does not have password protection on it...

0
 

Author Comment

by:martinbw
ID: 1828224
I didn't create the code - the wizard did.  I'm happy to post one of the pages (it's around 450 lines).  Do I just add it as a comment or can I "attach" it in some way?
0
 
LVL 4

Expert Comment

by:mitek
ID: 1828225

did you set up the source as System DSN or User DSN ?

also, what's the name of the .mdb file that is supposed to be bound to DSN ?

after you created DSN, did you press Test button to make sure it works?

0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
LVL 4

Expert Comment

by:mitek
ID: 1828226
do not post the whole 450-line page here yet, please. I don't think we'll need it.
0
 
LVL 4

Expert Comment

by:mitek
ID: 1828227
do not post the whole 450-line page here yet, please. I don't think we'll need it.
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1828228
You can email it to me at masseym@hotmail.com if you wish...


0
 

Author Comment

by:martinbw
ID: 1828229
I used a system DSN (on both my work station and the server where the app will be running).

The MDB is holidays2.mdb.

I don't see a "Test" option in the ODBC setup...

The DB doesn't have any Access security on it and I've just made it fully available to everyone via NT security.
0
 

Author Comment

by:martinbw
ID: 1828230
It's 6pm here in the UK and I'm going out tonight.  So have to leave.  Really appreciate your help guys.  Catch up with you and your suggestions tomorrow.  Thanks again.

MasseyM, have emailed you some of the code.

Cheers

Martin
0
 
LVL 4

Expert Comment

by:mitek
ID: 1828231
Still -- looks like it's a DSN problem.

go to Control Panel ==> ODBC ==> System DSN ==> YourDSN_Name

and see if

a) it points to holidays2.mdb (Database: C:\db\holidays2.mdb)
b) ==> Options ==> Exclusive is not checked
c) ==> Options ==> Read Only is not checked
d) ==> Advanced ==> Read Only value is 0

0
 

Author Comment

by:martinbw
ID: 1828232
Ok done this:

a) it points to holidays2.mdb = YES
b) ==> Options ==> Exclusive is not checked = YES
c) ==> Options ==> Read Only is not checked = YES
d) ==> Advanced ==> Read Only value is 0 = YES


0
 

Author Comment

by:martinbw
ID: 1828233
Can anyone help any further on this one?
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1828234
Martin,

Your code looked clean... (Except the wizard puts in a lot of garbage that isn't really necessary...)  Have you tried recreating the database?  Also, is this site online yet?  If so, post the URL and we will surf over to it and see if we get the same problem...

0
 
LVL 4

Expert Comment

by:mitek
ID: 1828235
maybe, just drop and re-create the DSN ?

also, is .mdb file readable by everybody ?


0
 
LVL 28

Expert Comment

by:sybe
ID: 1828236
Close your database in Access, this error occurs when you have your database opened in design mode.
0
 

Author Comment

by:martinbw
ID: 1828237
Thanks, but closing the access database was one of the first things I tried.  

I've solved the problem myself now.  It wasn't an ODBC DSN problem.  It was a problem with the code Visual InterDevs wizard was producing.  In the Global.asa file it created a string variable used throughout the web app in other asp files:

Session("DataConn_ConnectionString") = "DSN=absence; DBQ=\\testres\databases\absdata.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=512;PageTimeout=5;"

DataConn_ConnectionString is used in other asp files to open the data connection.  You'll notice that after the actual DSN name there's a whole bunch of info that is actually held in the DSN anyway.  I removed this leaving:

Session("DataConn_ConnectionString") = "DSN=absence;"

And this worked.  It seems that the "DBQ=\\testres\databases\absdata.mdb" part was causing the problem.

Anyway thanks for everyones comments.  I'd like to award points as follows and will if you tell me how to do it:

MasseyM - 50 for looking at asp code
MiteK - 35 for providing sensible DSN comments
Sybe - 15 for having a go

Thanks again
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1828238
YOu will need to contact the customer support and let them know how you want to do the point thing.  
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1828239
I knew there was something other than the DNS... The ASP code looked fine.  I should have known it was the global.asa... AARRGGHH :)  Don't you just hate that?
0
 
LVL 7

Accepted Solution

by:
linda101698 earned 370 total points
ID: 1828240
I'm posting the solution found so it can be saved in the Previously Asked Questions (PAQ).  I'm going to add 100 points to your account so you can post questions for the experts who helped.  See your customer service question for explanation.

Linda Gardner
Customer Service @ Experts Exchange

Solution:
I've solved the problem myself now.  It wasn't an ODBC DSN problem.  It was a
     problem with the code Visual InterDevs wizard was producing.  In the Global.asa
     file it created a string variable used throughout the web app in other asp files:

     Session("DataConn_ConnectionString") = "DSN=absence;
     DBQ=\\testres\databases\absdata.mdb;DriverId=25;FIL=MS
     Access;MaxBufferSize=512;PageTimeout=5;"

     DataConn_ConnectionString is used in other asp files to open the data
     connection.  You'll notice that after the actual DSN name there's a whole bunch of
     info that is actually held in the DSN anyway.  I removed this leaving:

     Session("DataConn_ConnectionString") = "DSN=absence;"

     And this worked.  It seems that the "DBQ=\\testres\databases\absdata.mdb" part
     was causing the problem.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to count occurrences of each item in an array.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question