简体   繁体   English

mysql odbc驱动程序在Visual Studio 2008上可以正常运行,但在Visual Studio 2010上不能正常运行

[英]mysql odbc driver works fine on visual studio 2008 but not on visual studio 2010

Hey guys i got a problem which is doing my head in, and was hoping someone would be able to point me in t he right direction. 大家好,我遇到了一个问题,希望有人能指出正确的方向。

I have ac# application which i wrote using visual studio 2008 at the time i installed a mysql odbc 3.51 driver this app worked fine connection to a mysql db on my localhost and let me do what i needed to do. 我有一个ac#应用程序,我在安装mysql odbc 3.51驱动程序时使用Visual Studio 2008编写了此应用程序,该应用程序可以很好地连接到本地主机上的mysql db,并让我执行所需的操作。

i got a copy of visual studio 2010 from the microsoft dreamspark website installed it, opened the solution to the app i had written in 2008 made some changes ran it and it works totally fine. 我从Microsoft dreamspark网站安装了Visual Studio 2010副本,并打开了我在2008年编写的应用程序的解决方案,对它进行了一些更改使其运行正常,并且运行良好。

Then i created a new application this time starting it in vs2010 created my odbc connection the same way as i did in the 2008 app but now i get an error saying: 然后,我这次创建了一个新应用程序,在vs2010中启动它,就像在2008年应用程序中一样,创建了odbc连接,但是现在我收到一条错误消息:

"ERROR [IN002][Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified" “找不到错误[IN002] [Microsoft] [ODBC驱动程序管理器]数据源名称,也未指定默认驱动程序”

i then opened vs2008 and tried again to make a simple app to test my connection and it worked fine. 然后,我打开vs2008,然后再次尝试制作一个简单的应用程序来测试我的连接,效果很好。

i can only quess that it is something to do with visual studio 2010. 我只能问这与Visual Studio 2010有关。

any ideas would be most welcome :) 任何想法将是最受欢迎的:)

Vade 瓦德

尝试重新安装MySQL驱动程序,可能会希望它进行一些Visual Studio调整,这些调整将出现在您的2008项目中,但如果随后安装了,则不会出现在新的2010项目中。

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

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