title: Using Javascript to connect SQL Server database
body: <p>I need to use Javascript to read some data from SQl Server 2008 Database.
  So I wrote this:(html page code)</p>
  
  <pre><code>&lt;!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"/&gt;
  &lt;title&gt;Database Connect&lt;/title&gt;
  &lt;script type="text/javascript"&gt;
  function loadDB(){
  var connection = new ActiveXObject("ADODB.Connection");
  
  var connectionstring="Data Source=ИЛЬЯ-ПК;Initial Catalog=C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\SIGMA_Database.mdf;User ID=Илья;Password="";Provider=SQLOLEDB";
  
  connection.open(connectionstring);
  var rs = new ActiveXObject("ADODB.Recordset");
  
  rs.Open("SELECT Username FROM Users", connection);
  rs.MoveFirst();
  while(!rs.eof)
  {
     document.write(rs.fields(1));
     rs.MoveNext();
  }
  
  rs.close();
  connection.close();
  
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload="loadDB()"&gt;
  &lt;div id="main"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>However, nothing happens!
  What is wrong with it?There're some cyrillic alphabet symbols in connection string, can it be a source of problem?Or another thing is going wrong?</p>