473,412 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Database Connection Problem

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.
Jul 19 '05 #1
1 1590
http://www.aspfaq.com/show.asp?id=2009

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"Apostolis K." <ap***********@hotmail.com> wrote in message
news:e5**************@tk2msftngp13.phx.gbl...
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.

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Nick Gilbert | last post by:
Hi, I have an asp.net application which runs from a CD-ROM using Cassini. As such, it is single user only. The application connects to an Access database when it is loaded, and keeps the same...
7
by: News | last post by:
Hello, I have to build a program with the future in mind and I need a bit of guidance from a guru or two. My program will start as a multi-user Windows Application built with VB.Net and using an...
2
by: Ron St-Pierre | last post by:
We're developing a java app and are using postgres as the database. On our dev server I started the app, closed it, but the java process was still open so I killed it, which caused the above error....
10
by: mjf | last post by:
Hello, We made a backup image file for a database on one machine (A), and we restored the database on another machine (B), using the backup image file. Everything went fine. But when we try to...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
5
by: Sam | last post by:
Hi all, I have a process which first pulls one time all application IDs from a database and stores them in a table(this process works fine everytime). I then loop through the table, one at a...
18
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft...
5
by: Usman Jamil | last post by:
Hi I've a class that creates a connection to a database, gets and loop on a dataset given a query and then close the connection. When I use netstat viewer to see if there is any connection open...
8
by: BD | last post by:
I am developing C# win form app to work with remote database on SQL Server 2005. Problem scenario is as follows: 1. a form is open that has downloaded dataset to local cache 2. computer is...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.