PDA

View Full Version : PWS and Where To Go


ScottInTexas
04-16-2003, 12:22 AM
I am starting a website that has an access DB. I am using MS Personal Web Server to handle the website until it is published. Does anyone know what sub directory the DB should go into? Personal Web Server has created several. I think it should be in the _Private because I assume there is some barrier between the _Private subdirectory (on a real server) and the the public.

Any hints or ideas?


Thanks,

whammy
04-16-2003, 04:15 AM
Create a folder called "database" that's in your inetpub folder.

Then store your access databases in that. In order to access it you'll need to use Server.MapPath() to map the LOCAL path to your database.

The reason you want to do this is so your entire database can't be downloaded from the web.

I don't have an example handy since I just built a new computer system and haven't transferred the data to this one, but if you do a search of this forum you will find plenty of info. If you need more help just holler...

Set Conn = Server.CreateObject("ADODB.Connection")
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("\UserName\db\dbname.mdb") & ";" & _
"Persist Security Info=False"
Conn.Open(sConnection)


http://www.brinkster.com/GeneralDatabaseGuide.asp

This may not specifically apply to your situation but it should help...

ScottInTexas
04-16-2003, 09:24 PM
Thanks Whammy,

I appreciate your help. It worked with the exception of the location of the file.

I can't seem to "Find" anything above the wwwroot directory.

Even using the several examples found here and at the w3schools I can't get an include to work.

MS has an example like this


<!--#include virtual ="/iissamples/homepage.inc"-->


Where iissamples is in the inetpub directory. So if I put MyFiles in the inetpub directory I should be able to put this in my web page


<!--#include virtual ="/MyFiles/homepage.inc"-->


But it can't find the file. BTW, does the include file HAVE to have an inc extension?

whammy
04-17-2003, 12:51 AM
Hmm, I don't have any problems finding the file using Server.MapPath() - try response.write() ing your path to see what you're actually getting.

And no, includes don't have to be .inc - I usually include .asp pages instead.