ASP problems

  • Thread starter Thread starter Steve Grosz
  • Start date Start date
S

Steve Grosz

I am trying to write the connection string for my Access database, and added
the ASP code to the web page. When I try to view the page online, here's
the error I get:

[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.

What is causing this? And what can I do to resolve it? I don't have a
password on the database, and this is running on a W2K SP4 server, and IIS.

Thanks!
Steve
 
This error will occur if you have the database opened in Access while trying
to access it in an ASP page.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Steve,
It means that the file is locked, or that the permissions aren't
good enough to access the file. By password it has nothing to do with an
Access password. Remember that NT based operating systems like Win 2K have
security information on everything. By default, IIS uses the IUSR account to
access any files initiated by an anonymous web user. If the IUSR account
doesn't have enough permissions to view the database then it could be
throwing this error. It could also be that the file is open, and has been
locked by the operating system. One of the troubles with Access is it wasn't
designed for high-volume sites (even more than 10 connections and it starts
to bugger out).

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Its not opened. At least I'm not doing anything to it, and therefore, it
has no reason to be opened.

Steve

Kevin Spencer said:
This error will occur if you have the database opened in Access while trying
to access it in an ASP page.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Steve Grosz said:
I am trying to write the connection string for my Access database, and added
the ASP code to the web page. When I try to view the page online, here's
the error I get:

[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.

What is causing this? And what can I do to resolve it? I don't have a
password on the database, and this is running on a W2K SP4 server, and IIS.

Thanks!
Steve
 
See Mark's answer for other possibilities.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Steve Grosz said:
Its not opened. At least I'm not doing anything to it, and therefore, it
has no reason to be opened.

Steve

Kevin Spencer said:
This error will occur if you have the database opened in Access while trying
to access it in an ASP page.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Steve Grosz said:
I am trying to write the connection string for my Access database, and added
the ASP code to the web page. When I try to view the page online, here's
the error I get:

[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.

What is causing this? And what can I do to resolve it? I don't have a
password on the database, and this is running on a W2K SP4 server, and IIS.

Thanks!
Steve
 
I have been having this problem occurring over the last few days.
Access 2000 sp3 XP Pro.
Access is under the impression that the database is locked when it is not!.
This piece of code (from MS web site) shows the results
Sub ShowUserRosterMultipleUsers()
Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long

cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "Data Source=c:\database\timesheet2.mdb"

cn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=c:\database\timesheet2.mdb"

' The user roster is exposed as a provider-specific schema rowset
' in the Jet 4 OLE DB provider. You have to use a GUID to
' reference the schema, as provider-specific schemas are not
' listed in ADO's type library for schema rowsets

Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")

'Output the list of all users in the current database.

Debug.Print rs.Fields(0).Name, "", rs.Fields(1).Name, _
"", rs.Fields(2).Name, rs.Fields(3).Name

While Not rs.EOF
Debug.Print rs.Fields(0), rs.Fields(1), _
rs.Fields(2), rs.Fields(3)
rs.MoveNext
Wend

End Sub

Results

COMPUTER_NAME LOGIN_NAME CONNECTED SUSPECT_STATE
MR-509W86E1FWDE Admin True Null
MR-509W86E1FWDE Admin True Null
MR-509W86E1FWDE Admin True Null

Thinks there are three users logged in when in fact there was only one.

I cannot resolve how to UNLOCK the db i.e. remove erroneous connections.

Any Ideas.

Robin
 
Have you tried import the database into the current open FP web, then when prompted, create the
connection, and let FP move the database to the fpdb folder?

The above should eliminate the PC's Admin account from having access to the database when run under
IIS.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Back
Top