mysql oledb driver

后端 未结 2 489
-上瘾入骨i
-上瘾入骨i 2021-01-17 02:59

how to install mysql oledb driver in local system.

please give Mysql oledb Connection string

相关标签:
2条回答
  • 2021-01-17 03:45
    Provider=OleMySql.MySqlSource.1
    
    0 讨论(0)
  • 2021-01-17 03:59

    .NET Solution (c#)

    You need to install MySql.Data using Package-Manager...

    PM>Install-Package MySql.Data

    Then, in your c# code do something like this..

    using System.Data.OleDb;
    using System.Data.Common;
    using MySql.Data.MySqlClient;
    
    DbProviderFactory factory = new MySqlClientFactory();
    DbConnection cxn = factory.CreateConnection();
    cxn.ConnectionString = "server=mysqlserver;port=3306;Database=mydb;user id=myname;password=mypass;SslMode=none;Convert Zero Datetime=True";
    cxn.Open();
    
    
    
    
    
    0 讨论(0)
提交回复
热议问题