Do you know what is Connection string to database?
I have gave you all the information required in post above. You canot simply set the path to the database, and use it as a connection string. Connection string is consisted of more then one parameters. This is an example:
ATTENTION: To use ConfigurationManager class, you have to add new Reference (right click on References in Solution explorer, and Add, go down to select System.Configuraton - and dont forget to add a new nameSpace on the top of the class, where you have the upper code I gave you:
This tutorial explains all what you have to know to get your code working.
Connection = ConfigurationManager.ConnectionStrings["ContentTestConnection"].ToString();
Here ContentTestConnection is the name of the connection string whose values is the information about the the database connectivity.
using (MySqlConnection objconnection = new MySqlConnection(Connection))
using (MySqlCommand cmd = new MySqlCommand(query, objectconnection))
I hope this helps.
Feel free to ask questions
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...