Database Connection Problem

A

Apostolis K.

I have created a database called "myshop.mdb"
Then I create a System DSN connected to that database called "OE1"

The following code retrieves attributes and possible errors from the DSN
Connection
----------------------------------------------------------------------------
-----------
<%
Set myConn=Server.CreateObject("ADODB.Connection")
myConn.Open "OE1"

Response.Write "Attributes: " & myConn.Attributes & "<BR>"
Response.Write "Command TimeOut:" & myConn.CommandTimeout & "<BR>"
Response.Write "Connection String:" & myConn.ConnectionString & "<BR>"
Response.Write "Connection Timeout" & myConn.ConnectionTimeout & "<BR>"
Response.Write "Cursor Location:" & myConn.CursorLocation & "<BR>"
Response.Write "Default Database:" & myConn.DefaultDatabase & "<BR>"
Response.Write "Isolation Level:" & myConn.IsolationLevel & "<BR>"
Response.Write "Mode:" & myConn.Mode & "<BR>"
Response.Write "Provider:" & myConn.Provider & "<BR>"
Response.Write "State:" & myConn.State & "<BR>"
Response.Write "Version:" & myConn.Version & "<BR>"

FOR EACH item IN myConn.Errors
Response.Write "Number:" & item.Number & "<BR>"
Response.Write "NativeError:" & item.NativeError & "<BR>"
Response.Write "Source:" & item.Source & "<BR>"
Response.Write "SQLState:" & item.SQLState & "<BR>"
Response.Write "Description:" & item.Description & "<BR>"
NEXT

myConn.Close
%>
----------------------------------------------------------------------------
-----------


When I run the script I get this error

Error Type:
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.
 

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
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top