These asp files were originally hosted by an ISP but are now being
hosted by a computer on my network.
The web pages and database are hosted on a Windows 2000 machine
running IIS.
The web server is working but I get errors (-1) whenever i try to
access the database.
I think it's because I have not setup ODBC properly from the ODBC
Datasource Administrator.
Can someone guide me through this?
The code that connects to the database (If indeed a connection is
needed when the database is on the same server as the web server.)
when hosted by my ISP is:
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:\inetpub\wwwroot\MySite\myDatabase.mdb"
This is what I use:
dim oConn, serverpath
serverpath = "myDatabase.mdb"
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath(serverpath)
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
In addition to that, make sure that the permissions on the folder where the
MDB file exists are set appropriate for the security context under which ASP
runs (typically IUSER_<nameofmachine>)
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
I have also had issues with the temp folder that IUSER needs to have
write permission as well.
> I wonder if I can connect to my MySQL database instead of the mdb
> file...
>
I think that's a great idea. If you're going to be testing on your own
machine, you'll have to download the driver for it. MySQL Migration Kit
will also convert all your access tables to MySQL. If you don't already
have it, I also highly recommend HeidiSQL MySQL client.