title: "login failed for user" when connecting to database through javascript
body: <p>My web page has some links and radio buttons. Selecting a particular link and radio button combination, and then clicking on "Get Results" button would run the query.
  But I am getting the below error:
  Login failed for user 'dev\rahulsingh'</p>
  
  <p>Below is a sample code:</p>
  
  <pre><code>runThisQuery = "select * from DataType_tbl sample (nolock) where sample.dataValue = 'POPULATION';";
  
  var connection = new ActiveXObject("ADODB.Connection");
  var connectionstring="Data Source=prmserv;Initial Catalog=dataDB;User ID=DOMAIN\\REDACTED;Password=REDACTED;Provider=SQLOLEDB";
  connection.Open(connectionstring);
  var rs = new ActiveXObject("ADODB.Recordset");
  rs.Open(runThisQuery, connection);
  alert(rs);
  </code></pre>
  
  <p>at the line that says "connection.Open(connectionstring);", I hit an error:</p>
  
  <blockquote>
    <p>Login failed for user 'dev\rahulsingh'</p>
  </blockquote>
  
  <p>I cannot use PHP because I don't know PHP; and I have to do something around this tool, within this month itself.</p>
  
  <p>Please help.</p>
  
  <p>:(</p>