DotNet Academy of Rajesh Rolen

Solutions by Rajesh Rolen

Connect .NET with MySQL

To connect .NET with MySQL u will have to follow following steps

  1. install mysql-connector-net-5.2.3 from net (its free)
  2. Import mysql.data which u will get in installation folder of above software
  3. import namespace = imports MySql.Data.MySqlClient
  4. then use mysqladaper,mysqlcommand,mysqlconnection as u use oledbdataatapter,oledbcommand,OleDbConnection
  5. when ever u will try to exis table which contain date in 00:00:0000 format then u will get exception like 'unable to convet mysqldatetime type to system datetime type' so to overcome this type of problem either make that datatime field in table as allow null or write the following in connection string "Allow Zero Datetime=true"

0 comments:

Post a Comment

About this blog

My Blog List

Advertise On This Site

Site Info

Advertise on this Site

To advertise on this site please mail on RajeshRolen@gmail.com

Information Source

About

Pages

Dot Net Academy

Advertis in This Area of Site

Powered by Blogger.

Followers

Search This Blog