Forums

This topic is locked

Connection to database and site structure

Posted 17 Dec 2004 00:06:46
1
has voted
17 Dec 2004 00:06:46 Howard Walker Walker posted:
My ISP insists on putting my web files in a www directory that is one step below the root.EG
Root
|
|- www-
|
site files
So I have a local root directory containing a www directory which contains site files, the connections directory and the templates.
The local site was set up using IIS, and a simulated remote server and testing server, which means that the root was effectively what is now the www directory.
To try to match the ISP site, I created a www directory within my local site and placed all the files in it. Everything workd fine (except for template updates, solved by moving the templates direcoty into the root.) in both my local machine and the web machine. However, as soon as I needed another active asp page, Dreamweaver promptly forgot the existing connection directory, and created a new one in the root. Result - all my server behaviours have a red ! against them. If I don't try to edit them they work fine, but as soon as I click on them they loose the connection.

When I try to define a new connection, I get a message [Microsoft][ODBC driver datasource name too long] - but it is no longer than before.
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("../www/data/arc.mdb" is the new one
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("../data/monarch.mdb" was the old one, so I don't think the message has anything to do with the problem.
Has anyone got any ideas or suggestions? Please?
I'm using access, asp and win2000

Replies

Replied 17 Dec 2004 02:56:23
17 Dec 2004 02:56:23 Simon Martin replied:
I think its quite common practice for ISP's to separate out the folders; it allows them to put a Database folder (if you're working with something like Access) outside the root directory which enhances security; SQL server would always be outside the root of your site anyway
Set up DWMX as you would normally do - but when setting up the remote server make sure you use the www directory when setting the path. You'll have to manually do the database - but set cloaking on the DB directory if you've got it inside your root structure so it doesnt get uploaded with everything else

Live the life you love
Love the life you live

Simon

[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]
Replied 17 Dec 2004 18:23:10
17 Dec 2004 18:23:10 Howard Walker Walker replied:
Thanks for the info. I was coming around to that conclusion, because other parts that I use will not work unless they exist in the root.

As to the problem with data source too long, a correction to the inverted commas at the end of the string fixed that.
Cheers

Reply to this topic