Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which assembly for MySQL Connection for Universal App

I want to build a connection to a database using the MySQL Connector. I get a connection with the assembly MySql.Data.RT.dll but this was for Win RT. Is this also the right one for a Win 10 Universal app, or is it better to use one of the .NET 4.5 Framework:

enter image description here

My Question is:

Which assembly to choose for a Windows Universal App ?

like image 433
FoldFence Avatar asked Mar 20 '16 23:03

FoldFence


People also ask

How do I connect an application to a MySQL database?

To Connect to a MySQL Database Expand the Drivers node from the Database Explorer. Right-click the MySQL (Connector/J driver) and choose Connect Using.... The New Database Connection dialog box is displayed. In the Basic Setting tab, enter the Database's URL <HOST>:<PORT>/<DB> in the corresponding text field.

Which is correct way to create connection with MySQL?

To add a connection, click the [+] icon to the right of the MySQL Connections title on the home screen. This opens the Setup New Connection form, as the following figure shows. The Configure Server Management button (bottom left) opens an optional configuration wizard for setting shell commands on the host.

Which connector is used to connect the MySQL with Python?

Python needs a MySQL driver to access the MySQL database. In this tutorial we will use the driver "MySQL Connector". We recommend that you use PIP to install "MySQL Connector". PIP is most likely already installed in your Python environment.


1 Answers

MySql connections are happen through

MySql.Data and MySql.Data.MySqlClient

these two assemblies are most commonly used dll files for any mysql connectivity.

For Example code in C#:

    MySqlConnection MYSQLCON;
    MySqlDataAdapter daDataAdapter;
    MySqlCommand MYSQLCmd;
    public MYSQLDataAccess()
    {
        ConnectionStrinG = getMySqlConnectionString();
        MYSQLCON = new MySqlConnection(ConnectionStrinG);
    }
    public string getMySqlConnectionString()
    {
        string CString = ConfigurationManager.AppSettings["MyCString"].ToString();  // Connection string from web.config
        string ConStr = ConfigurationManager.ConnectionStrings[CString].ToString();
        return ConStr;
    }
like image 183
DInesh AG Avatar answered Sep 22 '22 02:09

DInesh AG