[英]How can I configure the MYSQL ODBC driver to work with Visual Studio 2013?
I've installed MYSQL server, running local on 127.0.0.1 (I've also tried this with MySQL server at a public IP with same results). 我已经安装了MYSQL服务器,该服务器在127.0.0.1本地运行(我也已经在公用IP的MySQL服务器上尝试了此方法,并且结果相同)。
Here is how I'm configuring it: 这是我的配置方式:
Using MySQL Connector / ODBC (running localhost mysql server) using Visual Studio 2013 C# 使用Visual Studio 2013 C#使用MySQL Connector / ODBC(运行本地mysql服务器)
I click Design tab of a webform.aspx page - and click and drag (from Toolbox->Data->GridView into the MainContent frame, and drop. 我单击webform.aspx页面的“设计”选项卡-并单击并将其从Toolbox-> Data-> GridView拖放到MainContent框架中,然后拖放。
I then click the [>] button Under Choose Data Source, I choose to create a new data source. 然后,我单击[>]按钮。在“选择数据源”下,我选择创建一个新的数据源。
Under Data Source Configuration Wizard, I choose SQL Database. 在“数据源配置向导”下,选择“ SQL数据库”。
Next pops up a window, Configure Data Source - SqlDataSource1 接下来弹出一个窗口,配置数据源-SqlDataSource1
I click New Connection 我点击新建连接
Microsoft ODBC Data Source (ODBC) is selected as Data source - I leave it (note: here, I have tried changing this to MySql Data Source - but the connection fails). 选择Microsoft ODBC数据源(ODBC)作为数据源-我将其保留(注意:此处,我尝试将其更改为MySql数据源-但连接失败)。 so I use the ODBC option. 所以我使用ODBC选项。
I click the () Use Connection string: and click [Build] 我单击()使用连接字符串:,然后单击[构建]
A window pops up, and I select the Machine Data Source tab 弹出一个窗口,然后选择“机器数据源”选项卡
I have already created a Data Source named test_localhost_mysql, I select it. 我已经创建了一个名为test_localhost_mysql的数据源,我选择了它。
A window with MySQL Connector/ODBC connection parameters appears, with all of my connection data. 出现一个带有MySQL Connector / ODBC连接参数的窗口,其中包含我的所有连接数据。 I click Test. 我单击测试。
success. 成功。
I click [OK] 我点击[确定]
Now, the Add Connection - Use connection string, is filled in, along with my login information. 现在,添加了“添加连接-使用连接”字符串以及我的登录信息。
I click Test Connection 我单击测试连接
Success. 成功。
I click [OK] 我点击[确定]
configuration wizard is now complete, and shows a string. 配置向导现已完成,并显示一个字符串。
I click [NEXT] 我点击[下一步]
I click [NEXT] without changing anything 我没有更改就单击[NEXT]
Now is when it becomes interesting. 现在是时候变得有趣了。 on this screen; 在此屏幕上;
under Specify columns from a table or view - all my tables are in the drop down list. 在“从表或视图中指定列”下-我的所有表都在下拉列表中。 Periodically, the columns will show here as well. 这些列也会定期显示在此处。 Currently they aren't -- I'm sure this is not random, although I'm not sure what I'm doing to cause it. 目前他们不是-我确定这不是随机的,尽管我不确定我在做什么导致它。
I click [Next] after selecting my table. 选择表格后,单击[下一步]。
I click [TEST] 我点击[测试]
It fails. 它失败。
I am sure it's something simple, but I promise I've been through everything I can think of, and can really use some help please. 我敢肯定这很简单,但是我保证我会尽我所能,并且真的可以使用一些帮助。
Anyone that can guide me I would greatly appreciate it. 任何可以指导我的人,我将不胜感激。
I anxiously await your genious :) Thank you! 我焦急地等待您的慷慨:)谢谢!
Check this out. 看一下这个。 Try to install with the instructions here. 尝试按照此处的说明进行安装。 Report back if the issue persists. 如果问题仍然存在,请报告。 http://www.w3resource.com/mysql/mysql-odbc-connection.php http://www.w3resource.com/mysql/mysql-odbc-connection.php
EDIT: You also might want to run through all of your SQL code. 编辑:您可能还想遍历所有SQL代码。 It clearly says that the SQL syntax is not correct. 它清楚地表明SQL语法不正确。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.