Micro Focus QTP (UFT) Forums

Full Version: Windows 7 ADO.DB connection comand
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

In our f/w we are using Excel DSN to execute a set of qtp scripts. To open the connections for this, we use the following command:

Code:
Set dbConnect = CreateObject("ADODB.connection")
dbConnect.open "DSN=" & strDSN,"",""
sqlQry = "select * from [" & strSheetName & "$]"
rsTests.open sqlQry,dbConnect


This is working fine in windows XP machine. but the same in windows7 is giving the below error in line 2 (above code):
The specified DSN contains an architecture mismatch between the driver and Application.

I have no idea what this error is and fix for this. If anyone faced this issue, please share with me. I am spending so much time on this but no solution.

Pl help.

Thanks
Sams
Hi ,
I think it was working fine as you have created DSN in XP machine but in windows 7 you have not created.
Plz correct me if I am wrong.
Hi

Thanks for the reply. I created excel DSN in win7 machine too. Its not able to open the connection. Its throwing error "Data source mismatch error". I guess the syntax for opening the connection to DSN may be different for win7 machine, googled it but could not find any solution for my problem.
Can u pl help me out here.

Thanks
Sams
Anyone please give me solution. I am stuck up.

Thanks
Sams
The possible cause could be your office suite is running 32 bit which is not matching with the driver you have, you might need to upgrade office to 64 bit.