Micro Focus QTP (UFT) Forums
Windows 7 ADO.DB connection comand - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Windows 7 ADO.DB connection comand (/Thread-Windows-7-ADO-DB-connection-comand)



Windows 7 ADO.DB connection comand - sams001 - 01-09-2013

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


RE: Windows 7 ADO.DB connection comand - pradeep singh - 01-09-2013

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.


RE: Windows 7 ADO.DB connection comand - sams001 - 01-09-2013

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


RE: Windows 7 ADO.DB connection comand - sams001 - 01-10-2013

Anyone please give me solution. I am stuck up.

Thanks
Sams


RE: Windows 7 ADO.DB connection comand - Saket - 01-10-2013

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.