简体   繁体   English

将vb6连接到mysql:[Microsoft] [ODBC Driver Manager]找不到数据源名称,并且未指定默认驱动程序

[英]Connecting vb6 to mysql :[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I am trying to connect vb6 to mysql using xampp but I always get: 我试图使用xampp将vb6连接到mysql,但我总是得到:

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

This is my code: 这是我的代码:

Private Sub class_initialize()   
    DoEvents 
    Set con = New ADODB.Connection
    With con   
        .ConnectionString = "Driver=(MySQL ODBC 3.51 Driver); SERVER = localhost; PWD=; UID=root; PORT=3306; DATABASE=mydb;"   
        .CursorLocation = adUseClient   
        .Open  
    End With  
End Sub

I already installed mysql 3.51 driver and even the latest 5.3 driver and every time I test this connection it turns successful. 我已经安装了mysql 3.51驱动程序,甚至是最新的5.3驱动程序,每次测试此连接都会成功。 But still getting this error. 但是仍然出现此错误。

I also added this drivers into my System DSN in both ODBC Data Sources (64-bit) and ODBC Data Sources (32-bit) but still no luck. 我还将此驱动程序添加到ODBC数据源(64位)和ODBC数据源(32位)中的System DSN中,但是还是没有运气。

Any other solution? 还有其他解决方案吗?

Thanks 谢谢

Case Closed. 结案。 I just removed the parenthesis on driver. 我只是删除了驱动程序上的括号。

I wasted my time searching for solution. 我浪费时间寻找解决方案。 Never thought of it before posting because I just followed the video tutorial where in his driver name is inside of a parenthesis which worked perfectly. 在发布之前从未考虑过它,因为我只是按照视频教程进行操作,在该视频教程中,他的驱动程序名称位于括号内,该括号非常有效。 Haist. Haist。

暂无
暂无

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

相关问题 vb6连接到mysql:[Microsoft] [ODBC驱动程序管理器]找不到数据源名称,未指定默认驱动程序 - vb6 connecting to mysql :[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified VB6连接到MySQL5.7.16 [Microsoft] [ODBC驱动程序管理器]未找到数据源名称且未指定默认驱动程序 - VB6 connecting to MySQL5.7.16 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 我的SQL连接错误Microsoft] [ODBC驱动程序管理器]找不到数据源名称,并且未指定默认驱动程序 - My Sql Connection error Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 找不到Microsoft odbc驱动程序管理器数据源名称,也未指定默认驱动程序 - microsoft odbc driver manager data source name not found and no default driver specified 数据库错误:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified - Database error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified VBA出错:`[Microsoft] [ODBC管理器]未找到数据源名称且未指定默认驱动程序 - Error in VBA:`[Microsoft][ODBC Manager] Data source name not found and no default driver specified MySQL ODBC问题:找不到数据源名称,并且未指定默认驱动程序 - MySQL ODBC Issue: Data source name not found and no default driver specified “未找到数据源名称且未指定默认驱动程序”连接MySQL - “Data source name not found and no default driver specified” connecting mysql 找不到数据源名称,并且未指定默认驱动程序(ODBC) - Data source name not found and no default driver specified (ODBC) ODBC:找不到数据源名称,并且未指定默认驱动程序 - ODBC: Data source name not found and no default driver specified
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM