Database Connection ? (Newbie)

T

TNGgroup

Hi,

I create a Dbase connection (My first), using a system DSN file on my
webserver (IIS6) pointing to a Dbase on a File Server.

When opening my asp page, I got the error that or the mdb is opened
exclusively or I don't have enough rights.

I'm 100% sure that the file is not open, but the question is, about those
rights, is it the account logged on to the webserver which need access to
the file server or is it the user who opens the web site. anyway normally I
both accounts should have enough rights on the file server. However I only
need to extract data from the mdb, no writing is needed.
Maybe I should use another way of connecting.

Thx in advance

TNGgroup

Code used
 
T

Tom Kaminski [MVP]

TNGgroup said:
Hi,

I create a Dbase connection (My first), using a system DSN file on my
webserver (IIS6) pointing to a Dbase on a File Server.

When opening my asp page, I got the error that or the mdb is opened
exclusively or I don't have enough rights.

I'm 100% sure that the file is not open, but the question is, about those
rights, is it the account logged on to the webserver which need access to
the file server or is it the user who opens the web site. anyway normally I
both accounts should have enough rights on the file server. However I only
need to extract data from the mdb, no writing is needed.
Maybe I should use another way of connecting.

Start here:
http://www.aspfaq.com/search.asp?q=&type=ALL&category=1&numDays=0&order=2

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
 
B

Bob Barrows [MVP]

TNGgroup said:
Hi,

I create a Dbase connection (My first), using a system DSN file on my
webserver (IIS6) pointing to a Dbase on a File Server.

When opening my asp page, I got the error that or the mdb is opened
exclusively or I don't have enough rights.

I'm 100% sure that the file is not open, but the question is, about
those rights, is it the account logged on to the webserver which need
access to the file server or is it the user who opens the web site.
anyway normally I both accounts should have enough rights on the file
server. However I only need to extract data from the mdb, no writing
is needed.
Maybe I should use another way of connecting.

Thx in advance
Your solution will be found in this article:
http://www.aspfaq.com/show.asp?id=2009

Bob Barrows
 
C

CJM

First of all, I would use a DSN-less connection:

Set oConn = Server.CreateObject("ADODB.Connection")
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\folder;Extended
Properties=dBASE IV;User ID=uid;Password=pwd"
oConn.Open sConn
etc...

Assuming you are using Anonymous Authentication, the rights need to be given
to the IUSR_ServerName user. Check the rights again, and if it doesnt work,
repost with a code sample and the error message.

If you are only wanting Read access, you can configure the connection to be
read-only: insert 'oConn.Mode = 1' before you open the connection.


hth

Chris
 

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

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,417
Latest member
DarrenGaun

Latest Threads

Top