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
Saqi
NA
63
122.3k
How can i check my connection string is able to open
May 30 2012 8:24 AM
MySqlConnection cnn = new MySqlConnection();
cnn.ConnectionString += @"DataBase=" + dbhosts + ";";
cnn.ConnectionString += @"User=" + usuario + ";";
cnn.ConnectionString += @"Password=" + senha + ";";
cnn.ConnectionString += @"DataSource=" + hosts[count] + ";";
if ( cnn is able to open )
{
cnn.Open();
}
else
{
MessageBox.Show("HOST:" + hosts[count].ToString() + "DATABASE:" + dbhosts.ToString() + "\n\r" + "Recheck connection");
}
before open i need to know if it right connection How?
Reply
Answers (
2
)
how to get cell value of gridview in asp.net C# in text box
Want to remove the pipeline who length is less than 19 through for loop or while loop?