Home > Database > Mysql Tutorial > mysql-QTP连接MySQL5.0出错。

mysql-QTP连接MySQL5.0出错。

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 09:34:24
Original
1017 people have browsed it

mysqlqtp数据库

QTP中连接MySQL,编辑vbs脚本如下:
Dim Conn
Set Conn=CreateObject("ADODB.Connection")
'Const ConnectionString="DSN=test;DATABASE=chen;PWD=root;PORT=3306;SERVER=localhost;UID=root"
Const ConnectionString="Driver={Mysql ODBC 5.1 Driver};DATABASE=chen;PWD=111111;PORT=3306;SERVER=localhost;UID=root"
Conn.Open ConnectionString
If Conn.State0 Then
Reporter.ReportEvent micPass,"testing","连接数据库成功"
else
Reporter.ReportEvent micFail,"testing","连接数据库失败"
End If
一直报错:[Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序
Line (5): "Conn.Open ConnectionString". 。请问这个是什么原因?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template