S
syvman
Hello everyone... I have run across a very strange problem, and I'm at
my wits end, hehe. It seems that I'm unable to connect to an access
..mdb database file via Jet OLE DB Provider when I use a network shared
folder as the path AND the database is in use. In other words, if I
use "V:\databases\dbs\testdb.mdb" it will work fine (I have the V:
drive mapped to this machine's c: drive), but if I use
"\\machinename\dbs\testdb.mdb" then it will not work ('dbs' is set up
as a network shared folder). Please keep in mind that it doesn't work
ONLY when the database is in use - if the database is not in use, I am
able to connect to it just fine. This not only affects my VB app that
I'm working on, but also the datalink manager will not allow me to
connect to the MDB when I use the "\\machinename\dbs\testdb.mdb" as the
database path (by using the "Test Connection" button).
Anyone ever seen this before? This consistent across several machines,
not just mine, so I am pretty sure that someone else may have seen this
before. The reason I am required to use the machine name and network
shared folder path approach is because this app will be accessed by
others who won't have any drives mapped to this machine on the network.
Here's my connection string and connection method (the error occurs
during the .open):
Dim strDbConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" _
& strDBPath
Dim dbConnection As New OleDb.OleDbConnection(strDbConn)
dbConnection.Open()
Again, when strDBPath = "V:\databases\dbs\testdb.mdb" it works fine,
even if the db is open by someone else.
When strDBPath = "\\machinename\dbs\testdb.mdb" it works only when the
database is not open by someone else.
Thanks in advance for any suggestions! Have a great day!
-Terry
my wits end, hehe. It seems that I'm unable to connect to an access
..mdb database file via Jet OLE DB Provider when I use a network shared
folder as the path AND the database is in use. In other words, if I
use "V:\databases\dbs\testdb.mdb" it will work fine (I have the V:
drive mapped to this machine's c: drive), but if I use
"\\machinename\dbs\testdb.mdb" then it will not work ('dbs' is set up
as a network shared folder). Please keep in mind that it doesn't work
ONLY when the database is in use - if the database is not in use, I am
able to connect to it just fine. This not only affects my VB app that
I'm working on, but also the datalink manager will not allow me to
connect to the MDB when I use the "\\machinename\dbs\testdb.mdb" as the
database path (by using the "Test Connection" button).
Anyone ever seen this before? This consistent across several machines,
not just mine, so I am pretty sure that someone else may have seen this
before. The reason I am required to use the machine name and network
shared folder path approach is because this app will be accessed by
others who won't have any drives mapped to this machine on the network.
Here's my connection string and connection method (the error occurs
during the .open):
Dim strDbConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" _
& strDBPath
Dim dbConnection As New OleDb.OleDbConnection(strDbConn)
dbConnection.Open()
Again, when strDBPath = "V:\databases\dbs\testdb.mdb" it works fine,
even if the db is open by someone else.
When strDBPath = "\\machinename\dbs\testdb.mdb" it works only when the
database is not open by someone else.
Thanks in advance for any suggestions! Have a great day!
-Terry