|
 |
aspx thread: Error connecting to Access
Message #1 by bmcelhany@h... on Thu, 25 Jul 2002 15:42:14
|
|
Hello,
I am trying to establish a connection to an Access database through an
ASP.NET page and am receiving the following error:
Could not use ''; file already in use.
The database is definitely not open, so I'm not sure what's causing this
error to be thrown. Here is the code I'm using (the error is occuring on
the line that calls the open method of the connection object):
conPubs = New OleDbConnection ("Provider=Microsoft.Jet.OleDb.4.0;Data
Source=c:\developmentDB.mdb")
cmdSelect = New OleDbCommand ("SELECT * FROM Authors", conPubs)
conPubs.Open()
dtrAuthors = cmdSelect.ExecuteReader()
Any ideas? Thanks in advance!
Brian
Message #2 by Sam Clohesy <sam@e...> on Thu, 25 Jul 2002 15:37:32 +0100
|
|
Check the access dbase is not 'locked'
-----Original Message-----
From: bmcelhany@h... [mailto:bmcelhany@h...]
Sent: 25 July 2002 16:42
To: ASP+
Subject: [aspx] Error connecting to Access
Hello,
I am trying to establish a connection to an Access database through an
ASP.NET page and am receiving the following error:
Could not use ''; file already in use.
The database is definitely not open, so I'm not sure what's causing this
error to be thrown. Here is the code I'm using (the error is occuring on
the line that calls the open method of the connection object):
conPubs = New OleDbConnection ("Provider=Microsoft.Jet.OleDb.4.0;Data
Source=c:\developmentDB.mdb")
cmdSelect = New OleDbCommand ("SELECT * FROM Authors", conPubs)
conPubs.Open()
dtrAuthors = cmdSelect.ExecuteReader()
Any ideas? Thanks in advance!
Brian
Message #3 by bmcelhany@h... on Thu, 25 Jul 2002 16:06:19
|
|
It's not. I've completely shut down Access and even re-booted my computer.
> Check the access dbase is not 'locked'
-----Original Message-----
From: bmcelhany@h... [mailto:bmcelhany@h...]
Sent: 25 July 2002 16:42
To: ASP+
Subject: [aspx] Error connecting to Access
Hello,
I am trying to establish a connection to an Access database through an
ASP.NET page and am receiving the following error:
Could not use ''; file already in use.
The database is definitely not open, so I'm not sure what's causing this
error to be thrown. Here is the code I'm using (the error is occuring on
the line that calls the open method of the connection object):
conPubs = New OleDbConnection ("Provider=Microsoft.Jet.OleDb.4.0;Data
Source=c:\developmentDB.mdb")
cmdSelect = New OleDbCommand ("SELECT * FROM Authors", conPubs)
conPubs.Open()
dtrAuthors = cmdSelect.ExecuteReader()
Any ideas? Thanks in advance!
Brian
Message #4 by Sam Clohesy <sam@e...> on Thu, 25 Jul 2002 16:04:08 +0100
|
|
Is there one of the ldb files next to the dbase?
Sam Clohesy
Project Manager
Tel: 0208 772 3958
E: samc@e...
W: http://www.etypemedia.co.uk
-----Original Message-----
From: bmcelhany@h... [mailto:bmcelhany@h...]
Sent: 25 July 2002 17:06
To: ASP+
Subject: [aspx] RE: Error connecting to Access
It's not. I've completely shut down Access and even re-booted my computer.
> Check the access dbase is not 'locked'
-----Original Message-----
From: bmcelhany@h... [mailto:bmcelhany@h...]
Sent: 25 July 2002 16:42
To: ASP+
Subject: [aspx] Error connecting to Access
Hello,
I am trying to establish a connection to an Access database through an
ASP.NET page and am receiving the following error:
Could not use ''; file already in use.
The database is definitely not open, so I'm not sure what's causing this
error to be thrown. Here is the code I'm using (the error is occuring on
the line that calls the open method of the connection object):
conPubs = New OleDbConnection ("Provider=Microsoft.Jet.OleDb.4.0;Data
Source=c:\developmentDB.mdb")
cmdSelect = New OleDbCommand ("SELECT * FROM Authors", conPubs)
conPubs.Open()
dtrAuthors = cmdSelect.ExecuteReader()
Any ideas? Thanks in advance!
Brian
Message #5 by bmcelhany@h... on Thu, 25 Jul 2002 16:21:56
|
|
No.
> Is there one of the ldb files next to the dbase?
Sam Clohesy
Project Manager
Tel: 0208 772 3958
E: samc@e...
W: http://www.etypemedia.co.uk
-----Original Message-----
From: bmcelhany@h... [mailto:bmcelhany@h...]
Sent: 25 July 2002 17:06
To: ASP+
Subject: [aspx] RE: Error connecting to Access
It's not. I've completely shut down Access and even re-booted my computer.
> Check the access dbase is not 'locked'
-----Original Message-----
From: bmcelhany@h... [mailto:bmcelhany@h...]
Sent: 25 July 2002 16:42
To: ASP+
Subject: [aspx] Error connecting to Access
Hello,
I am trying to establish a connection to an Access database through an
ASP.NET page and am receiving the following error:
Could not use ''; file already in use.
The database is definitely not open, so I'm not sure what's causing this
error to be thrown. Here is the code I'm using (the error is occuring on
the line that calls the open method of the connection object):
conPubs = New OleDbConnection ("Provider=Microsoft.Jet.OleDb.4.0;Data
Source=c:\developmentDB.mdb")
cmdSelect = New OleDbCommand ("SELECT * FROM Authors", conPubs)
conPubs.Open()
dtrAuthors = cmdSelect.ExecuteReader()
Any ideas? Thanks in advance!
Brian
Message #6 by Immanuel_L'heureux@C... on Thu, 25 Jul 2002 08:23:51 -0700
|
|
Did you try
Source=c:/developmentDB.mdb
or
Source=c:\\developmentDB.mdb
sometimes the \ character is used as an escape char ...
Message #7 by bmcelhany@h... on Thu, 25 Jul 2002 16:59:21
|
|
It looks like it must have been a problem with that particular database
file. I created a new access database & now everything works fine. I tried
to open the old database and I'm getting an error saying that it's already
in use...so something has it locked up, but I'll be darned if I can find
out what it is.
Thanks for your help!
> Did you try
Source=c:/developmentDB.mdb
or
Source=c:\\developmentDB.mdb
sometimes the \ character is used as an escape char ...
Message #8 by "Aaron Chavez" <achavez382@w...> on Fri, 26 Jul 2002 17:45:42
|
|
> Hello,
> I am trying to establish a connection to an Access database through an
A> SP.NET page and am receiving the following error:
> Could not use ''; file already in use.
Is the database open in the Server Explorer window? The same thing
happened to me, took me a while to get this clue. Also, is this an exec
file? If so, compile and run it from the OS...this may provide more
details.
Message #9 by "Tony Di Nucci" <tony@m...> on Fri, 26 Jul 2002 18:47:28
|
|
This error tends to occur if the Access database is "Read-Only"
|
|
 |