C#:Access a MySQL Database Table from .Net

From Progzoo
Revision as of 08:01, 19 June 2008 by 146.176.162.21 (Talk) (New page: =Read from a MySQL database= <question xmlns:htm="http://www.w3.org/1999/xhtml" lang="cs" className='Demo'> To read from a '''non''' SQL Server database you can use the classes in System.D...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Read from a MySQL database

To read from a non SQL Server database you can use the classes in System.Data.OdbcClient

  • OdbcCommand
  • OdbcConnection
  • OdbcDataReader

The Odbc connection must be created first; this one is called MySQLscott.

  • Download the mysql-odbc-connector from mysql.com
  • Create the ODBC connection from Start/Control Panel/Administrative Tools/Datasources (ODBC)/System DSN

Read the name and population for each country with a population of more than 200000000.


[Font] [Default] [Show] [Resize] [History] [Profile]