2
Answers

How can i check my connection string is able to open

Photo of Saqi

Saqi

12y
1k
1
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?

Answers (2)

0
Photo of Jaganathan Bantheswaran
NA 21.9k 2.2m 11y
Try these steps & let us know.

Uninstall the application & crystal report runtime.
Restart the machine.
First install crystal report runtime
Install your application now. 
0
Photo of Prasadani Perera
NA 3 996 11y
Yes,All the DLL files are including set up file.Because all the other functions are working perfectly,only the problem with the reports.I installed crystal report runtime,but still the problem is same.I feel something has missed installing & I don't know what is it.Is something more I have to install or installing run time is not the correct one to install?Please help..
0
Photo of Jaganathan Bantheswaran
NA 21.9k 2.2m 11y
Hi,

How do you packed it? Package has all the necessary dlls?