ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories >> Architecture-Design >> Architecture-Design-AllOther
 
 


 

Back to Questions Page
 
Question
The main issue is suppose i have two databases and when 
user wants data for last 10 years data,it has to connect to 
one database and if user wants data for the past 1 year,it 
has to connect to the other database.like that .can i 
create two data sources in one properties file.is it 
possilbe.if so provide me the explaination.Thanks in 
advance.
Rank Answer Posted By  
 Question Submitted By :: Venkat
I also faced this Question!!   © ALL Interview .com
Answer
from .net technology point of view, u can use multipls 
connectionstrings to connect to the database.you can define 
that in web.config file under appSettings as follows....

<connectionStrings>
		<clear/>
		<!--Report Data base Connection String -->
		<add name="ReportingConnection" 
connectionString="Server=192.168.1.13;Database=Pegasus;UID=p
egasus;PWD=pegasus;Pooling=true;Max Pool 
Size=300;Connection Timeout=60"/>
		<!-- Data base Connection String to the 
pegasus admin database -->
		<add name="PegasusAdminConnection" 
connectionString="Server=192.168.1.13;Database=Pegasus;UID=p
egasus;PWD=pegasus;Pooling=true;Max Pool 
Size=300;Connection Timeout=60"/>
		<!-- Data base Connection String to the 
pegasus course database (admin database course database 
role. so, same as admin db conn string)-->
		<add name="PegasusDBConnection1" 
connectionString="Server=192.168.1.13;Database=Pegasus;UID=p
egasus;PWD=pegasus;Pooling=true;Max Pool 
Size=300;Connection Timeout=60"/>
		<!-- Data base Connection String to the 
pegasus course 1 database -->
		<add name="PegasusDBConnection2" 
connectionString="Server=192.168.1.13;Database=Pegasus;UID=p
egasus;PWD=pegasus;Pooling=true;Max Pool 
Size=300;Connection Timeout=60"/>
		<!-- Data base Connection String to the 
pegasus course 2 database -->
		<add name="PegasusDBConnection3" 
connectionString="Server=192.168.1.13;Database=Pegasus;UID=p
egasus;PWD=pegasus;Pooling=true;Max Pool 
Size=300;Connection Timeout=60"/>
	</connectionStrings>
 
0
Vamshi Krishna
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com