TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
San Myat
NA
41
1.2k
Get the data from the second databse from the config file
Jan 17 2019 1:03 AM
I want to display the data from the second database from the config file to my text box. How can I display the data from the second database in window form?
My code is
<appSettings>
<add key="myConnectionString1" value="server=localhost;database=myDb1;uid=myUser;password=myPass;" />
<add key="myConnectionString2" value="server=localhost;database=myDb2;uid=myUser;password=myPass;" />
</appSettings>
string connStr1 = ConfigurationSettings.AppSettings("myConnectionString1");
string connStr2 = ConfigurationSettings.AppSettings("myConnectionString2");
So, I want to get the data from the myDb2. Please guide me.
Reply
Answers (
1
)
Regex syntax error in c#?
How to Clear model after submit the data in database in MVC