Unpsecified Error with ODBC Connections

D

David Lozzi

This happens a lot to my databases. I store them at the root of my
developing files, i.e. c:\My Projects\Proj1\database.mdb. Randomly, the
security settings on this database will drop to the basic secutiry, myself
and SYSTEM. I need IUSR on it so I can access it through my ASP pages... I
get errors like this:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access 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.
/amr/common/adovbs.inc, line 4

and

Provider (0x80004005)
Unspecified error
/amr/common/adovbs.inc, line 4

and line 4 is this

2 Dim Connect
3 Set Connect = Server.CreateObject("ADODB.Connection")
4 Connect.Open "dsn name"

I will reset the permissions, then the ASP script will access the database
once, like read or write, then this will happen again. I have to reset the
permissions on the database file. Sometimes i'll have to do this 3 or 4
times until the permissions stick. It only happens on a few of my projects,
not all of them. Also, what helps at times, is within IIS, to check server
extensions. This seems to do something to it to help it to work.

Any Ideas?

--
David Lozzi
Associated Business & Technology Group
www.associatedbtg.com

I should've known that....but I had a brain fart.
 
B

Bob Barrows

This can happen when you compact the databases: the security settings for
IUSR can be lost.

FWIW, you should stop using ODBC and swtich to using the native Jet OLEDB
provider instead. See www.connectionstrings.com. The MSDASQL provider (the
provider used for ODBC drivers) has been deprecated by MS, and is not
recommended to be used. Granted, that won't fix this particular problem, but
....

HTH,
Bob Barrows
 

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

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top