Can I connect mysql to visual visual tools 2010 visual studio

My question is about Express edition vs Professional, should I use the database connections with the MySql.net connector in the express edition? Or does it only work in Professional Edition? I use express, and I tried the last .net connector, and it still does not appear in the database connection list.

+3
source share
3 answers

MySQL Connector / NET will not work in the Express version of Microsoft Studio due to limitations in express products. To use data sources based on server architecture, Express versions must be used. The ability to connect even to Microsoft MSSQL will not work, except for local limited versions of "Compact" or "Express".

+3
source

In Express Editions, you can add a dll connector to project links:

add links

mysql.data.dll

then use it as a class:

Imports MySql.Data.MySqlClient

Public Class Form1

Dim mycon As New MySqlConnection

Dim myadp As New MySqlDataAdapter

search the mysql documentation for more information.

+2
source

#, , :

// Put this at the top of the file, with the other "using..." lines
using MySql.Data.MySqlClient;

// [...]
public Form1() {
  MySqlConnection myCon = new MySqlConnection();
  MySqlDataAdapter myAdapter = new MySqlDataAdapter("SELECT * FROM foo;", myCon);
0

Source: https://habr.com/ru/post/1781444/


All Articles