永发信息网

QTP连接DB2出现的58004错误提示问题怎么解决

答案:1  悬赏:10  手机版
解决时间 2021-02-15 18:39
QTP连接DB2出现的58004错误提示问题怎么解决
最佳答案
提示错误:
[IBM][CLI Driver] SQL1042C 发生意外的系统错误。 SQLSTATE=58004

I have a problem in connecing QTP to DB2 and fetch query results.

My script goes like this: (sample POC)

connection_string = "Driver={IBM DB2 ODBC DRIVER};Database=ecomdb;Hostname=pyro.ecom.com;Port=50000;Protocol=TCPIP;Uid=admin;Pwd=adminqa;"

msgbox db_connect (curSession, connection_string)

Function db_connect( byRef curSession ,connection_string)
dim connection
on error Resume next
' Opening connection
set connection = CreateObject("ADODB.Connection")
If Err.Number <> 0 then
db_connect= "Error # " & CStr(Err.Number) & " " & Err.Description
err.clear
Exit Function
End If

connection.Open connection_string
If Err.Number <> 0 then
db_connect= "Error # " & CStr(Err.Number) & " " & Err.Description
err.clear
Exit Function
End If

set curSession=connection
db_connect=0

End Function

This script is popping up this error msg:

[IBM][CLI Driver] SQL1042C An unexpected system error occurred. SQLSTATE=58004

For the other connection string type,

data_DSN = "QAProd" 'dsn created in control panel
data_usr = "admin"
data_pwd = "adminqa"
data_alias = "ecomdb" 'name of the database
connection_string = "DSN="&data_DSN&";""UID="&data_usr&";""PWD="&data_pwd&";""DBALIAS="&data_alias&";"

i am getting same error or another error saying

password error - not able to reproduce when posting this thread

I checked connectionstrings.com and other threads in this forum discussing about QTP-DB2 connection, but couldn't find out the answer for my problem.

help me to untie this problem.

--------------------------------------------------------------------------------
Problem Description: Error: "[IBM][CLI Driver] SQL 1042C An unexpected system error occured. SQLSTATE=58004"

The user receives a "[IBM][CLI Driver] SQL 1042C An unexpected system error occured. SQLSTATE=58004" error message when trying to connect to an IBM DB2 client using a Database Checkpoint or ADODB statements within the script.

Diagnosis: The existence of the <Quicktest Professional>/bin/QTPro.exe.Local file conflicts with the ability of ADODB to open the DB2 client.

--------------------------------------------------------------------------------

Solution: Rename the QTPro.exe.Local file in the bin directory

The QTPro.exe.Local file is used for redirection of DLLs that QuickTest Professional loads. In the case of coexistence problems with other Mercury products, the file instructs Windows API to load DLLs from the <QuickTest Professional>\bin directory instead
of other directories. This is important for the coexistence between QuickTest Professional, LoadRunner, and old versions of Astra LoadTest.

Renaming this file should solve the problem. QuickTest Professional will work fine without QTPro.exe.Local, unless LoadRunner or Astra LoadTest are installed on the machine.

1. Close QuickTest Professional.
2. Open Windows Explorer, and navigate to the QuickTest Professional installation directory.
3. In the bin directory, locate the QTPro.exe.Local file, and rename it (for example, QTPro.exe.Local.old).
4. Restart QuickTest Professional.

After renaming the file, QuickTest Professional should be able to connect to the database and work with it as expected. If the error continues, try removing unneeded parameters in the connection string.
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
(13分)材料一:材料二:据全国道路交通事故
劳动大厦在什么地方啊,我要过去处理事情
讲述爸爸与儿子的电影
亲情号码怎么开通?
地狱少女阎魔爱的英文名字怎么拼、
live two doors away是什么意思
盛世嚼味臭豆腐怎么去啊,有知道地址的么
凌云的含义
诛仙3未飞升鬼道怎么加点包括天书 最好上图
大佬求解!
留春花园地址有知道的么?有点事想过去
今天在家里蒸馒头,发箫粉用开水烫了,等了3个
为什么很多人认为买保险就不吉利
川妹子酸辣粉在什么地方啊,我要过去处理事情
请问鲨鱼和人类还有大王乌贼哪个凶残?
推荐资讯
京东快递为什么垃圾 还申通 好慢哦 买东西都5
房地产买卖合同中“随房屋同时转让的设备装饰
如何界定土地增值税的征税对象
【当代神农氏课文】《当代神农氏》一课中,课
爱尚精品酒店这个地址在什么地方,我要处理点
裕佳广告这个地址在什么地方,我要处理点事
易转披萨地址有知道的么?有点事想过去
洪干社区第三安全小区(南3门)地址有知道的么
西峡县南阳柯达(仲景大道西段)我想知道这个在
甸山地址在哪,我要去那里办事
Mask Pro怎么安装?
公元前509年到公元前27年是多少年时间
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?