Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Windows 7 ADO.DB connection comand
#1
Not Solved
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
Reply
#2
Not Solved
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.
Reply
#3
Not Solved
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
Reply
#4
Not Solved
Anyone please give me solution. I am stuck up.

Thanks
Sams
Reply
#5
Not Solved
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.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] Connection String for Oracle robertosalemi 6 12,287 01-15-2016, 04:51 PM
Last Post: robertosalemi
  DB2 Connect connection with IE 11 SRP 1 2,621 12-18-2015, 12:41 PM
Last Post: vinod123
  IBM DB2 connection with VB script bmurali 2 10,916 12-18-2015, 12:38 PM
Last Post: vinod123
  Connection with HP ALM hachem 0 2,622 02-26-2015, 04:36 PM
Last Post: hachem
  “Cannot connect to 8822 (connection timed out)" Ikbal 0 2,138 12-08-2014, 11:38 PM
Last Post: Ikbal

Forum Jump:


Users browsing this thread: 4 Guest(s)