PDA

View Full Version : Connect to mysql c++ or c#?


wolfandcrow
11-22-2007, 10:30 AM
Hi,

I want to make an application that will connect to a mysql database and include some sort of live chat system (not going to use mysql for the chat system winstock maybe?)

What would be best to use c++ or c#?

Thanks

Inigoesdr
11-22-2007, 12:52 PM
Either should work. I don't know about C#, but C++ has an extension called MySQL++ that allows you to connect to it fairly easily.

wolfandcrow
11-22-2007, 01:49 PM
That's great thanks

oracleguy
11-22-2007, 09:37 PM
And for C# you can download from the company that makes MySQL their .NET connector .dll which adds all the objects for interacting with a MySQL database.

wolfandcrow
11-23-2007, 12:27 PM
So is c++ still more suitable?

oracleguy
11-23-2007, 11:34 PM
So is c++ still more suitable?

It just depends on what you want to do. C++ can be more portable (as in cross platform) but you can have a shorter development time in C#.

wolfandcrow
11-26-2007, 04:41 PM
After looking into it I found c# to be the most suitable for what I need to do. My only problem is finding out how to connect to an external Mysql database with c#? I have been looking around Google for a while now. And most of the examples I have found show how to connect to Mysql on a LAN.

I also looked up the "MySQL their .NET connector .dll" and also found examples but all where internal. Maybe the Mysql connector does to do external connections i just have not found how to do this any ideas?

Thanks

oracleguy
11-26-2007, 06:49 PM
After looking into it I found c# to be the most suitable for what I need to do. My only problem is finding out how to connect to an external Mysql database with c#? I have been looking around Google for a while now. And most of the examples I have found show how to connect to Mysql on a LAN.

I also looked up the "MySQL their .NET connector .dll" and also found examples but all where internal. Maybe the Mysql connector does to do external connections i just have not found how to do this any ideas?

Thanks

You just specify the address of the MySQL server you want to connect to. It will connect to any valid address that has a MySQL server running, be it on the local machine, LAN or Internet.

Here is the connector library in case you haven't found it: http://dev.mysql.com/downloads/connector/net/