18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

error "[ODBC Driver Manager] Data source name not found and no default driver specified"

CocoZhangCocoZhang Members
edited April 2013 in Sahi - Open Source
I have installed Saihi with version "sahi_v43_20130206" and office 2007 in my PC, also installed "AccessDatabaseEngine 2007" version. But When I tried to run scripts as below, I encounter error "java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".

var db = _getDB("sun.jdbc.odbc.JdbcOdbcDriver",
"jdbc:odbc:Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=D:\\Sahi\\Scripts\\TestData\\test.xlsx;readOnly=false",
"",
"");
db.update("update [Sheet1$] set field2='33' where field1='A'");

But in another PC, same sahi version, but installed office 2010 and "AccessDatabaseEngine 2010". It works well.

What goes wrong? Does the script is not correct for office 2007 and its engine? How to fix it? Does sahi support to access 2007 excel by ODBC driver? Thanks in advance!

Answers

  • sorry, the scipt for DBQ is like "DBQ=E:\\Sahi\\Scripts\\TestData\\test.xlsx"
  • This issue has been resolved as below,

    I found that my java version is x64. So I installed 32 java version and set system variable 'JAVA_HOME' to use it.
This discussion has been closed.