18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
ODBC Driver:Data source name not found and no default driver specified
OS Name: Windows Vista Home Premium
Browser Name and Version: IE and 9
Sahi Build: sahi_v35_20110719.jar (4.0 MB)
Microsoft & Excel 2002(10.2614.2635)
Hi,
The following error occured while re-playing a simple script, can anyone advice on this please ?
ERROR
exception: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Script:
var db = _getDB("sun.jdbc.odbc.JdbcOdbcDriver",
"jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=C:\\user.xlsx;readOnly=false", "", "");
// Run a select
$rs = db.select("select * from [user$]");
for(var $i=0; $i<$rs.length; $i++)
{
try
{
_click(_link("Log in"));
_setValue(_textbox("login[username]"), $rs[$i]["username"]);
_setValue(_password("login[password]"), $rs[$i]["Password"]);
_click(_submit("Login"));
_click(_span("Tablets"));
_click(_button("Add to Cart"));
_click(_button("Proceed to Checkout"));
_click(_button("Continue"));
_click(_button("Continue[2]"));
_click(_label("Check / Money order"));
_click(_radio("p_method_checkmo"));
_click(_button("Continue[3]"));
_click(_submit("Place Order"));
_click(_link("Logout"));
}
catch(e)
{
_logExceptionAsFailure(e); // Logs the exception, and fails, and in the logs, points to the original line as source of failure.
}
}
Browser Name and Version: IE and 9
Sahi Build: sahi_v35_20110719.jar (4.0 MB)
Microsoft & Excel 2002(10.2614.2635)
Hi,
The following error occured while re-playing a simple script, can anyone advice on this please ?
ERROR
exception: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Script:
var db = _getDB("sun.jdbc.odbc.JdbcOdbcDriver",
"jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=C:\\user.xlsx;readOnly=false", "", "");
// Run a select
$rs = db.select("select * from [user$]");
for(var $i=0; $i<$rs.length; $i++)
{
try
{
_click(_link("Log in"));
_setValue(_textbox("login[username]"), $rs[$i]["username"]);
_setValue(_password("login[password]"), $rs[$i]["Password"]);
_click(_submit("Login"));
_click(_span("Tablets"));
_click(_button("Add to Cart"));
_click(_button("Proceed to Checkout"));
_click(_button("Continue"));
_click(_button("Continue[2]"));
_click(_label("Check / Money order"));
_click(_radio("p_method_checkmo"));
_click(_button("Continue[3]"));
_click(_submit("Place Order"));
_click(_link("Logout"));
}
catch(e)
{
_logExceptionAsFailure(e); // Logs the exception, and fails, and in the logs, points to the original line as source of failure.
}
}
Comments
I have just noticed that my OS-Windows is 64 bit and excel version I am using is 32 bit, this may be one of the reason for failure. However appreciate if any expert helps to figure out the exact problem?
Thanks
Reddy
var db = _getDB("sun.jdbc.odbc.JdbcOdbcDriver",
"jdbc:odbc:Driver={Microsoft Excel Driver (*.xlsx)};DBQ=C:\\user.xlsx;readOnly=false", "", "");
Srinath.
thanks for reply.
I haven't tried this option, however this got resolved after upgrading my EXCEL from 32 bit to 64 bit.
Thanks once again.
CBReddy