Need help setting up a database server on win2k.

S

SpreadTooThin

I have a microsoft access mdb file that is accessed by asp files
hosted on the same server.

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"
 
A

Adrienne Boswell

Gazing into my crystal ball I observed SpreadTooThin <bjobrien62
@gmail.com> writing in @j21g2000yqe.googlegroups.com:
I have a microsoft access mdb file that is accessed by asp files
hosted on the same server.

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)
 
D

Douglas J. Steele

Adrienne Boswell said:
Gazing into my crystal ball I observed SpreadTooThin <bjobrien62
@gmail.com> writing in @j21g2000yqe.googlegroups.com:


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)

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>)
 
A

Adrienne Boswell

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>)

I have also had issues with the temp folder that IUSER needs to have
write permission as well.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed SpreadTooThin <[email protected]>
writing in @o6g2000yqj.googlegroups.com:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top