QTP连接DB2出现的58004错误提示问题怎么解决
答案:1 悬赏:10 手机版
解决时间 2021-02-15 18:39
- 提问者网友:星軌
- 2021-02-14 22:39
QTP连接DB2出现的58004错误提示问题怎么解决
最佳答案
- 五星知识达人网友:枭雄戏美人
- 2021-02-14 23:31
提示错误:
[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.
[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.
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯