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
482
2.9k
198.1k
multiple mssql connection string in class c#
Jul 25 2019 3:43 AM
multiple mssql connection string in class c#
Need for my app
Have database 2017,2018,2019...I add IN every form connection string
string
BSS_2017 = Properties.Settings.Default.MG_SISTEM_2017CS;
string
BSS_2018 = Properties.Settings.Default.MG_SISTEM_2018CS;
string
BSS_2019 = Properties.Settings.Default.MG_SISTEM_2019CS;
string
con;
Then in label chek value (2017,2018 or2019)
public
popis()
{
InitializeComponent();
yearlabel.Text = getYear();
}
And connect
private
String getGodina()
{
string
value = login.godina.ToString();
return
value;
}
public
void
PullData()
{
if
(yearlabel.Text ==
"2017"
)
{
con = BSS_2019;
}
else
if
(yearlabel.Text ==
"2018"
)
{
con = BSS_2018;
}
else
if
(yearlabel.Text ==
"2019"
)
{
con = BSS_2019;
}
}
That work fine...but...I must put this in every form in my app....need help
To create some class with this value.
Help?
Reply
Answers (
7
)
json convert to string
How To Enable fulltext in my Query in ES?