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
Goran Bibic
484
2.9k
196k
Connection string in class C#
Jul 14 2019 2:25 AM
I make accounting app
Need to add class with multiple Connection string
Type
Public class
database
Database name BSS_2018, BSS_2019...etc
Database username a
Database password a
Database2017
Database2018
Database2019
etc..
This is good way, but have new year must add string in ALL FORMS in APP.
Need to create class with this data
Some help?
What I have tried:
Using before this way with label
string
BSS_2018 = Properties.Settings.Default.BSS_2018CS;
string
BSS_2019 = Properties.Settings.Default.BSS_2019CS;
string
con;
InitializeComponent();
yearlabel.Text = getYear();
public
void
PullData()
{
if
(yearlabel.Text ==
"BSS_2018"
)
{
con = BSS_2018;
}
else
if
(yearlabel.Text ==
"BSS_2019"
)
{
con = BSS_2019;
}
}
Reply
Answers (
1
)
What is the difference between different versions of .Net?
FlowLayoutpanel Reload