Jump to content

jackt

Members
  • Posts

    3
  • Joined

  • Last visited

jackt's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi It worked elsewhere because the other host was using microsoft SQL. wolstech's message made me double check that I was using MySQL, which I was not. My code was for Microsoft SQL. I have since changed the code and all works as it should. Thank you for your help Jack.
  2. I tried replacing the host with the IP you gave, but it gives the same error. See the attached image for the full error message. Thanks for your help
  3. Hi I've been trying to make a windows desktop application with visual studio using C# and i'm having trouble connecting to the mySQL database. my connection string is "Database=jackt_database;Address=johnny.heliohost.org;User Id=jackt_un;Password=*******" (obviously password isn't *******) the user ID has been added to the database and has been given all privileges. I've added the wildcard "%" to the remote mySQL section to allow connections from all IP addresses. I've tried resetting the password and changing it in my code multiple times. It is 100% not the code because i have tested it using a different host and it worked. // sql server connection here string constring = "Database=jackt_database;Address=johnny.heliohost.org;User Id=jackt_un;Password=********"; SqlConnection sqlcon = new SqlConnection(constring); try { sqlcon.Open(); MessageBox.Show("sqlconnection successful"); } catch (Exception error) { MessageBox.Show(error.ToString()); } finally { sqlcon.Close(); } i get the error "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 the sql server is configured to allow remote connections." later in the error it says "the network path was not found". Any help would be greatly appreciated. Cheers Jack
×
×
  • Create New...