简体   繁体   English

我可以将mysql连接到visual studio 2010 express可视化工具

[英]Can I connect mysql to visual studio 2010 express visual tools

My question is about Express edition vs Professional, should I be able to use the database connections with MySql .net connector in the express edition? 我的问题是Express Edition vs Professional,我是否可以在快递版中使用MySql .net连接器的数据库连接? Or does it only work in the Professional edition? 或者它只适用于专业版? I'm using express and I've tried the latest .net connector and it still doesn't show up in the database connections list. 我正在使用快递,我已经尝试了最新的.net连接器,它仍然没有显示在数据库连接列表中。

MySQL Connector/NET will not work in the Express Version of Microsoft Studio due to limitations within the express products. 由于快递产品的限制,MySQL Connector / NET将无法在Microsoft Studio的Express版本中运行。 In order to use Data sources based in server architecture Non-"Express" versions must be used. 要使用基于服务器体系结构的数据源,必须使用非“Express”版本。 Connectivity to even Microsoft's Own MSSQL will not work, aside from local limited "Compact" or "Express" versions. 除了本地有限的“Compact”或“Express”版本之外,连接到微软自己的MSSQL也行不通。

In Express Editions you can add the dll conector to the project references: 在Express Edition中,您可以将dll conector添加到项目引用中:

add references 添加引用

mysql.data.dll

then use it like a class: 然后像课一样使用它:

Imports MySql.Data.MySqlClient

Public Class Form1

Dim mycon As New MySqlConnection

Dim myadp As New MySqlDataAdapter

search in mysql documentation for more info. 搜索mysql文档以获取更多信息。

To use in C#, after adding the reference, you use it like this: 要在C#中使用,在添加引用后,您可以像这样使用它:

// 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);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM