Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

C#/C++ to mySQL

Options
  • 07-01-2008 7:34pm
    #1
    Registered Users Posts: 1,987 ✭✭✭


    I've a site up and running and was interested in developing an app in c#(preferred) or c++ that uses this existing DB from the site which is a mySQL DB, is it possible??


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Yes.


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    Yes.
    Thanks, thats all i need to know, appreciated!:D


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    Ziycon wrote: »
    Thanks, thats all i need to know, appreciated!:D
    Ok i lied, I'm back, trying to follow this tutorial(http://www.functionx.com/mysqlnet/vcnet/Lesson02.htm), is this right what i have so far? Keep in mind its about a year since I've used C++!
    using namespace std;
    
    int main()
    {
    	return 0;
    }
    
    private: System::Void btnConnect_Click(System::Object *  sender, System::EventArgs *  e)
    {			
    	 MySqlConnection *conSQL = new MySqlConnection(S"Server=11.11.111.111;"
    			                                       S"Persist Security Info=no;"
    			                                       S"User Name='username';"
    												   S"Password='password'");
    }
    


  • Registered Users Posts: 981 ✭✭✭fasty


    That code is just taken straight from the tutorial with additional connection details.

    Why not call the Open() function of conSQL and see if it throws an exception, or print info about the connection state?

    Here are some docs on it...

    The examples are in VB and C# as opposed to managed C++ but you'll get the general idea.

    You can also use ADO.net to connect to MYSql databases btw.


  • Registered Users Posts: 610 ✭✭✭nialo


    Ziycon, you still having issues with this? drop me a mail on netsoc if you are..


  • Advertisement
  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    Folks,

    It clearly states that asking for private messges is against the forum rules. It breaks the flow of the thread. Please refrain from doing so Nialo.

    E.P.


  • Registered Users Posts: 610 ✭✭✭nialo


    apologies!


Advertisement