Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. connecting to mysql server in remote location ..

connecting to mysql server in remote location ..

Scheduled Pinned Locked Moved C / C++ / MFC
helpdatabasemysqlgraphicssysadmin
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Thilek
    wrote on last edited by
    #1

    hi guys, i been writing a program that connect to a remote database in speedhosting.co.cc .But i been having problem to connect its showing error when i run it... Error message : An unhandled exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll Additional information: Unable to connect to any of the specified MySQL hosts. below is my coding :-

    _**#pragma once

    namespace trialcpp {

    using namespace System;
    using namespace System::ComponentModel;
    
    using namespace System::Collections;
    using namespace System::Windows::Forms;
    using namespace System::Data;
    using namespace System::Drawing;
    using namespace MySql::Data::MySqlClient;
    
    
    /// <summary>
    /// Summary for Form1
    ///
    /// WARNING: If you change the name of this class, you will need to change the
    ///          'Resource File Name' property for the managed resource compiler tool
    ///          associated with all .resx files this class depends on.  Otherwise,
    ///          the designers will not be able to interact properly with localized
    ///          resources associated with this form.
    /// </summary>
    
    
    public ref class Form1 : public System::Windows::Forms::Form
    {
    public:
    	Form1(void)
    	{
    		InitializeComponent();
    		//
    		//TODO: Add the constructor code here
    		//
    	}
    	
    
    protected:
    	/// <summary>
    	/// Clean up any resources being used.
    	/// </summary>
    	~Form1()
    	{
    		if (components)
    		{
    			delete components;
    		}
    	}
    
    
    private: System::Windows::Forms::Button^  cmdLogin;
    private: System::Windows::Forms::Button^  cmdExit;
    
    protected: 
    
    private:
    	/// <summary>
    	/// Required designer variable.
    	/// </summary>
    	System::ComponentModel::Container ^components;
    

    #pragma region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    void InitializeComponent(void)
    {
    this->cmdLogin = (gcnew System::Windows::Forms::Button());
    this->cmdExit = (gcnew System::Windows::Forms::Button());
    this->SuspendLayout();
    //
    // cmdLogin
    //
    this->cmdLogin->Location = System::Drawing::Point(52, 190);
    this->cmdLogin->Name = L"cmdLogin";
    this->cmdLogin->Size = System::Drawing::Size(75, 23);
    this->cmdLogin->TabIndex = 0;
    this->cmdLogin->Text = L"Login";
    this-&**_

    S 1 Reply Last reply
    0
    • T Thilek

      hi guys, i been writing a program that connect to a remote database in speedhosting.co.cc .But i been having problem to connect its showing error when i run it... Error message : An unhandled exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll Additional information: Unable to connect to any of the specified MySQL hosts. below is my coding :-

      _**#pragma once

      namespace trialcpp {

      using namespace System;
      using namespace System::ComponentModel;
      
      using namespace System::Collections;
      using namespace System::Windows::Forms;
      using namespace System::Data;
      using namespace System::Drawing;
      using namespace MySql::Data::MySqlClient;
      
      
      /// <summary>
      /// Summary for Form1
      ///
      /// WARNING: If you change the name of this class, you will need to change the
      ///          'Resource File Name' property for the managed resource compiler tool
      ///          associated with all .resx files this class depends on.  Otherwise,
      ///          the designers will not be able to interact properly with localized
      ///          resources associated with this form.
      /// </summary>
      
      
      public ref class Form1 : public System::Windows::Forms::Form
      {
      public:
      	Form1(void)
      	{
      		InitializeComponent();
      		//
      		//TODO: Add the constructor code here
      		//
      	}
      	
      
      protected:
      	/// <summary>
      	/// Clean up any resources being used.
      	/// </summary>
      	~Form1()
      	{
      		if (components)
      		{
      			delete components;
      		}
      	}
      
      
      private: System::Windows::Forms::Button^  cmdLogin;
      private: System::Windows::Forms::Button^  cmdExit;
      
      protected: 
      
      private:
      	/// <summary>
      	/// Required designer variable.
      	/// </summary>
      	System::ComponentModel::Container ^components;
      

      #pragma region Windows Form Designer generated code
      /// <summary>
      /// Required method for Designer support - do not modify
      /// the contents of this method with the code editor.
      /// </summary>
      void InitializeComponent(void)
      {
      this->cmdLogin = (gcnew System::Windows::Forms::Button());
      this->cmdExit = (gcnew System::Windows::Forms::Button());
      this->SuspendLayout();
      //
      // cmdLogin
      //
      this->cmdLogin->Location = System::Drawing::Point(52, 190);
      this->cmdLogin->Name = L"cmdLogin";
      this->cmdLogin->Size = System::Drawing::Size(75, 23);
      this->cmdLogin->TabIndex = 0;
      this->cmdLogin->Text = L"Login";
      this-&**_

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      It's obviously escaped your notice that this isn't the C++/CLI forum[^] - I'd ask your question there...

      T 1 Reply Last reply
      0
      • S Stuart Dootson

        It's obviously escaped your notice that this isn't the C++/CLI forum[^] - I'd ask your question there...

        T Offline
        T Offline
        Thilek
        wrote on last edited by
        #3

        i am new to this forum so i not sure the different between C++/MFC and C++/CLI.. Kindly explain to me plz...

        S 1 Reply Last reply
        0
        • T Thilek

          i am new to this forum so i not sure the different between C++/MFC and C++/CLI.. Kindly explain to me plz...

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          C++/CLI = C++ for .NET C++/MFC = C++ without using .NET

          T 1 Reply Last reply
          0
          • S Stuart Dootson

            C++/CLI = C++ for .NET C++/MFC = C++ without using .NET

            T Offline
            T Offline
            Thilek
            wrote on last edited by
            #5

            thanks ya..

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups