Data driven website for multiple region.

  • raj74
  • Born
  • Born
  • raj74
  • Posts: 2

Post 3+ Months Ago

hi,

I have 50 pages most of them are data driven pages from database using asp /sql 2000. This is for a particular region.

Now I have to plan for another region with the same number of pages but only the content from the database will change.

regions will be identified by different domain names.

How can i do it?

Shall i go for different database for each region and assign the connect string the moment user request a page? if this is the best method how can i assign the connect string when user requests a page.

thanks in advance
raj
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

Your idea of using two different databases and varying the connection string at the different domains sounds like a good idea to me. If I understand correctly, you want to use the same set of dynamic pages on two different servers to display content based on the connection string at the different locations.

I don't use asp myself, but I am familiar with it. I would think that the simplest way to do it would be to have the connection strings inside files that you could include at the top of all your dynamic pages that access the databases.

For both of the sites you could have a file perhaps called "database.asp" in an include directory and all your dynamic pages could have something like this at the top:
Code: [ Select ]
<!--#include file="include/database.asp"-->


Then you could use two different files named "database.asp" - one for each site with one containing something like:
Code: [ Select ]
<%
Const DB_Connection = "connection string one goes here"
%>
  1. <%
  2. Const DB_Connection = "connection string one goes here"
  3. %>

and the other:
Code: [ Select ]
<%
Const DB_Connection = "connection string two goes here"
%>
  1. <%
  2. Const DB_Connection = "connection string two goes here"
  3. %>

That way the only difference between the two sets of pages would be the contents of the "database.asp" file at the two different locations.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 70 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.