Click here to Skip to main content
15,888,109 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
How to use multiple database in a C Sharp Project. Can anyone help me, please?
Posted
Updated 12-Jun-13 22:35pm
v3
Comments
yourfriendaks 13-Jun-13 3:43am    
In Which Sense U Want To Use multiple Database, Explain?
Sumon562 13-Jun-13 3:47am    
Suppose I have a database name is Inventory, 2nd one is HR, 3rd one is Accounts.....
and many other
yourfriendaks 13-Jun-13 3:53am    
u have to change database name within a connection string
at time of use
Sridhar Patnayak 13-Jun-13 4:24am    
Repeated question, look at this link for your actual question and answers http://www.codeproject.com/Questions/606081/HowplustoplususeplusMultipleplusDatabaseplusinplus
lukeer 13-Jun-13 5:32am    
Or, even clickable: original question[^]

1 solution

Hello,

I think it is not a big task, You can use multiple Database(any number of database) for that you have to create different connection string for each database. and then you can use each database.

But I think you can manage these thing(inventory,hr,accounts etc..) in one database also by using multiple related tables(Relational Database).

Thanks
Developers Blog[^]
 
Share this answer
 
Comments
Sumon562 13-Jun-13 3:59am    
Thank you for your valuable answer. Actually I want to make a method that will connect database which database I need
Hemant Singh Rautela 13-Jun-13 4:23am    
No prob
you can pass the database name,IP address,user and password in this method and then can initialize connection string dynamically.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900