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.
_getDB For SQL Server 2008
Please send me code for connecting SQL server. I tried with below, but it didn't
_getDB("com.microsoft.jdbc.sqlserver.SQLServerDriver" ,"202.65.157.57","my username","my password")
_getDB("com.microsoft.jdbc.sqlserver.SQLServerDriver" ,"202.65.157.57","my username","my password")
This discussion has been closed.
Comments
Could you please check your connection details?
Also, check if you have added the necessary jars to the classpath?
Have a look at this URL : http://sahi.co.in/forums/viewtopic.php?id=1591
Let me know if you face any issue.
Regards
Sumitra
I used "sqljdbc4.jar" (SET SAHI_EXT_CLASS_PATH=..\..\extlib\db\sqljdbc4.jar;)
and my code is changed as
var $db = _getDB("com.microsoft.sqlserver.jdbc.SQLServerDriver","jdbc:sqlserver://url;DatabaseName=DBName","Uid","PWD")
var $tbl = $db.select("select * from TblName")
var $len = $tbl.length
_alert($len)