Lachee Posted April 19, 2013 Posted April 19, 2013 I am currently using helio to host my database as my other provider doesn't allow me to have remote connections. I require remote connections for my SQL database as i am currently working on a project. This project is a program. The program must be able to access the database and pull and submit values from my database. I am currently making the program in Microsoft Visual C# 2010 Express and i am having issues connecting to the database. here is my current code: static void Main() { using (SqlConnection myConnection = new SqlConnection("user id=lachee_admin;" + "password=SECRETWORDS;server=johnny.heliohost.org;" + "Trusted_Connection=yes;" + "database=lachee_BrutalGame; " + "connection timeout=2")) { try { myConnection.Open(); } catch { MessageBox.Show("Could Not Connect To Database", "Connection Error 001", MessageBoxButtons.OK, MessageBoxIcon.Error); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Lobby()); } } For some reason, it cannot connect to the database. It states (when not surrounded my try and catch): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) I am sure that i have allowed remote connection to my database because I have inputted the wildcard (%). Is there anyway to connect? Does helio even support external program connection?
Shinryuu Posted April 20, 2013 Posted April 20, 2013 Try using MySql.Data.MySqlClient.MySqlConnection instead of System.Data.SqlClient.SqlConnection.
Lachee Posted April 20, 2013 Author Posted April 20, 2013 Try using MySql.Data.MySqlClient.MySqlConnection instead of System.Data.SqlClient.SqlConnection. It says MySql namespace could not be found. Am i suppose to download a certain library? If so, can you please supply a link?
Shinryuu Posted April 20, 2013 Posted April 20, 2013 http://www.helionet.org/index/topic/15235-solved-aspnet-not-working-with-mysql-after-publishing-to-heliohost/page__st__15
Lachee Posted April 20, 2013 Author Posted April 20, 2013 Thank You. Have it working now Great Service your providing.
Shinryuu Posted April 20, 2013 Posted April 20, 2013 Glad your question got answered! Please spare a few minutes to take our brief survey: http://feedback.heliohost.org/ Your participation in this survey is greatly appreciated.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now