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
480
2.9k
200.3k
Conection string class mysql C#
Oct 2 2019 1:06 AM
I have more then 50000 records in table
Using connection sting in class
Time I spent now is more then 30 seconds, default value.
Need to setup conection life time or Conection time out
Need help
string
server = ConfigurationManager.AppSettings[
"server"
].ToString();
string
username = ConfigurationManager.AppSettings[
"username"
].ToString();
string
password = ConfigurationManager.AppSettings[
"password"
].ToString();
string
database = ConfigurationManager.AppSettings[
"database"
].ToString();
// string conection = ConfigurationManager.AppSettings["connection time"].ToString();
conn =
new
MySqlConnection(@
"server="
+ server +
";userid="
+ username +
";"
+
"password="
+ password +
";database="
+ database);
OR
conn =
new
MySqlConnection(
"Data Source='192.168.1.135';Port=3306;Database='prijavnica_app';UID='prijavnica';PWD='prijavnica'; Connect Timeout=120;"
);
Reply
Answers (
3
)
Loader not working proper
Updating Date Column Using a Select DATEADD() parameter