3 Replies - 707 Views - Last Post: 08 January 2011 - 01:39 AM Rate Topic: -----

#1 aaron1178  Icon User is offline

  • Dovakiin, Dragonborn
  • member icon

Reputation: 169
  • View blog
  • Posts: 1,303
  • Joined: 22-October 08

C# and MySQL

Posted 07 January 2011 - 12:41 AM

Hello,
I am trying to connect to a local MySQL server. I've read on the MSDN site that you cannot connect to MySQL server only SQL ODBC ect., is this true? Does that mean i will have to learn C/C++

Thanks Aaron1178
Is This A Good Question/Topic? 0
  • +

Replies To: C# and MySQL

#2 Antiokus  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 192
  • Joined: 06-September 06

Re: C# and MySQL

Posted 07 January 2011 - 12:54 AM

I'd do a search for the .NET MySQL adapter. There is one out there - just too lazy to go find it.
Was This Post Helpful? 1
  • +
  • -

#3 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4577
  • View blog
  • Posts: 8,019
  • Joined: 08-June 10

Re: C# and MySQL

Posted 07 January 2011 - 09:03 AM

http://dev.mysql.com.../connector/net/
Was This Post Helpful? 2
  • +
  • -

#4 Xeonen  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 64
  • Joined: 01-January 11

Re: C# and MySQL

Posted 08 January 2011 - 01:39 AM

Search google for mySQL connector, download it, install it, add MySql.Data.dll to your resources and to your code.


using MySql.Data.MySqlClient;

namespace User_System
{
    class dStream
    {
        private MySqlConnection conn = new MySqlConnection("Server=ServerAdress;Database=DatabaseName;Uid=UserID;Password=YourPassword");
        private MySqlCommand command;
        private MySqlDataReader reader;
    }
}

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1