This topic is locked

Connection to a remote DNS

3/26/2004 10:10:30 PM
ASPRunnerPro General questions
author

Hello,
I am having problems to connecto to a remote DNS, up to now I have only worked in my own computer, never with a server. Uploading everything, including the database inside the wwroot I did not have any problems, I just gave the correct permissions to the directory and it worked. Now I want to put the database outside the wwwroot as it should be and there comes my problems.
Server is Windows 2000.
In the server the access database is defined as a System DNS ODBC Data Source. Its location in the server is: C:\inetpub\databases\vsc.mdb
The wwwroot directory is located in: c:\inetpub\wwwroot
The files created by asprunner are stored inside \vsc\ directly in the root.
Thank you for your help! I just have to say that I have tried a LOT of ASP generators and as soon as I got to asprunner you can tell the difference. It is a great product.

Sergey Kornilov admin 3/27/2004

Diego,
please post your connection string here. I'll tell you what you need to change.

501053 3/28/2004

strConnection = "Provider=MSDataShape;DBQ=" & server.mappath("..\..\..\databases\VSC.mdb") & ";Driver={Microsoft Access Driver (*.mdb)}
Here goes, thank you.

501054 3/28/2004

Thank you very much for answering so fast. I read through the forum and found out what my problem was and have already been able to make the connection.
Now I have a new problem: I was able to connect, but when editing I cannot get through, I get the 'Operation must use an updateable query' message.

So I went into the server and gave full priviliges to everyone and to IURS.
It still gave me the problem, so I went to your FAQ page, and found out that

when the database is located outside of the inetpub/wwwroot directory, even though the information is still able to be viewed and searched, it cannot be updated unless it is in that directory.
So my questions now are:

  1. Do I have to put the database in the wwwroot for it to be able to be updated? I didn't want it there cause it cn be easily accessed or downloaded.
  2. If this is the case and I DO need to have the database in the wwwroot, what is the best thing I can do to protect it?
    thank you por your patience!
    Diego

Sergey Kornilov admin 3/30/2004

Here is the best approach to protect your database:

  1. Put your database to some folder outside of wwwroot so it cannot be downloaded on the Internet.
  2. Give IUSR_... user full rights on this database folder
  3. Adjust your connection string (which I think you did already) to point it to new database location.
    I hope this helps.