access_asp thread: Opening an Access Database wih .asp
Message #1 by "John Howard" <Howard_JohnA@e...> on Wed, 27 Mar 2002 19:05:27
|
|
Help!
I am trying to open an Access database that resides remotely on a server
through an .asp page using an ODBC. When I try to connect to the database
the .asp seems to be able to make the connection but it then fails when
trying to do the open. I have looked in a couple of books on .asp but this
problem is not covered. Any suggestions would be appreciated.
Thanks
Message #2 by "Mack Samuel" <mack.samuel@h...> on Wed, 27 Mar 2002 19:46:53
|
|
If you paste some code here, we can look at it and try to figure out
what's going on.
By the way, do you have a valid System DSN for the database on the server
on which the database is installed?
> Help!
> I am trying to open an Access database that resides remotely on a server
t> hrough an .asp page using an ODBC. When I try to connect to the
database
t> he .asp seems to be able to make the connection but it then fails when
t> rying to do the open. I have looked in a couple of books on .asp but
this
p> roblem is not covered. Any suggestions would be appreciated.
> Thanks
Message #3 by "John Howard" <Howard_JohnA@e...> on Wed, 27 Mar 2002 20:30:08
|
|
Here is the connection string I am currently using. I have also tried to
use The Jet OLE DB 4.0 and an ODBC connection where I created a DSN. Like
I said I am able to connect ok. I just can't do the open. Do you happen to
know if accessing an Access database across a network is even possible
using .asp. Thanks for you help.
JOhn
strProvider = "Driver={Microsoft Access Driver (*.mdb)};
DBQ=G:\80SQual\Admin\tco_db.mdb;"
set objConn = server.createobject("ADODB.Connection")
objConn.Open strProvider
set cm = Server.CreateObject("ADODB.Command")
cm.ActiveConnection = objConn
> If you paste some code here, we can look at it and try to figure out
w> hat's going on.
> By the way, do you have a valid System DSN for the database on the
server
o> n which the database is installed?
>
>
>> Help!
> > I am trying to open an Access database that resides remotely on a
server
t> > hrough an .asp page using an ODBC. When I try to connect to the
d> atabase
t> > he .asp seems to be able to make the connection but it then fails
when
t> > rying to do the open. I have looked in a couple of books on .asp but
t> his
p> > roblem is not covered. Any suggestions would be appreciated.
> > Thanks
Message #4 by "Jose Bueno" <jbueno@i...> on Wed, 27 Mar 2002 22:02:57
|
|
There are two solutions:
1. create a dsn on the webserver that points to that resource.
2. use the full UNC path to the server
eg. \\computername\drive\folder\subfolder\file.mdb
Using a mapped path to another system has not worked in my experience.
-Jose
Message #5 by "Jose Bueno" <jbueno@i...> on Wed, 27 Mar 2002 22:09:17
|
|
My apologies... now that I've reread your question my answer may not be
entirely applicable... does the webserver have read/write access to the
folder your database is in?
|