views:

234

answers:

5

I have not done database programming in C++ and C# before, but did some in Java. Now I am asked to figure out the options to do it in C# or C++ (not sure which one yet). We may use the MySQL RDBMS.

I searched online and found .NET SQL Data Provider, OleDB and ODBC.

What other APIs exist? What's your recommendation? Do I need to buy separately? Are they API can be used directly?

A: 

You can download MySQL connectors for .NET from the MySQL website: http://dev.mysql.com/downloads/connector/net/6.1.html.

Connectors to other DBMSes can be found on the database providers website. Some come pre-installed with Visual Studio.

tster
+1  A: 

There is also a data provider in .NET for Oracle if you want to consider that.

The following data providers are actually included in .NET

  • OLDB
  • OLEDB
  • Oracle
  • SQL

You can start using these by including their namespaces and working with the relevant classes. You can also work easily with XML in .NET using the in-built classes. If this is your first time working with data in .NET I would strongly recommend reading up on ADO.NET and LINQ.

Peter Kelly
A: 

An earlier question about C++ ORMs.

As for C#/.NET, there are native providers, the OLEDB provider, and ODBC provider. There are native providers for MySQL, PostgreSQL, MS SQL Server, Oracle, etc. The programming model is the same if you use the IDbConnection, IDbCommand, etc. interfaces.

If you don't want to write all the code yourself - iBatis.NET, Subsonic, NHibernate, etc. are good libraries to look at.

Justin Rudd
+1  A: 

maybe this can help you

http://soci.sourceforge.net/

Davit Siradeghyan
A: 

You can use http://debea.net and connect to MySQL via ODBC.

Lukasz