I've tried to create a global SqlConnection with System.Configuration and the following path:
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["db"].ConnectionString);
But, my main problem is that |DataDirectory| from app config does not get the current location from my database, so when I try to apply a command it does nothing. How can a create a connection that can work if I move the project on another PC without changing the connection strings?