By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 911 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

How can I get my asp application to access a database on my domain, from my subdomain

P: 3
I am using a member area manager program, and have subdomains on my website. My challenge is that I want the program to access the same database (on the domain) from both subdomains. The file I've been told to change is this:
Expand|Select|Wrap|Line Numbers
  1. <%
  2. ' FileName="Connection_ado_conn_string.htm"
  3. ' Type="ADO" 
  4. ' DesigntimeType="ADO"
  5. ' HTTP="true"
  6. ' Catalog=""
  7. ' Schema=""
  8. MM_membersareamanager_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/databases/MembersAreaManager.mdb") & ";"
  9. %>
I've been instructed to change it to call on the main domain, but am at a loss as to how to do this. Any advice would be greatly appreciated.
Jan 14 '08 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,355
Please use code tags

I've never used ASP but I suspect they want you to use the absolute path instead of a relative path.

i.e. C:\Website\Database.mdb rather than

Jan 14 '08 #2

Expert 2.5K+
P: 3,532
This really is an ASP question, I think, so I'm going to move it over to that side of the fence!

Welcome to TheScripts!

Linq ;0)>
Jan 14 '08 #3

Expert 100+
P: 254
The location of the database is relative to the root folder of the site. If you have your db in a subfolder of the website's root folder then your connection string would be \mydbfolder\mydb.mdb. Same goes for images and other items \images\myimage.jpg. The domain/subdomain should not be an issue - if the users have access to the site and the appropiate db drivers (Access) are set up then users should be able to retrieve data via your asp pages.

I am not positive how to do this if and when the db resides outside the rootfolder structure.
Jan 14 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.