22 days ago
Connecting to a SQL Server database using Integrated Security from JavaScript
I have a BDD test. One of the step definitions connects to SQL Server database and fetches some data. I use JavaScript.
This the JavaScript code I have. The connection used Integrated Security, so no need to give user id and password
var connection=ADO.CreateADOConnection();
connection.ConnectionString="Provider=SQLOLEDB;Data Source=<datasource>;Initial Catalog=<database>;Integrated Security=SSPI";
connection.Open();
connection.Open() is throwing up a message box asking for user id and password. See the attached screenshot.
The above connection string works fine with Database Tables (Stores=>DbTable). See the attached screenshot.
Does anyone has code sample to connect to SQL database using integration security.