title: Problem in Inserting record to Sql Server 2008 by Javascript
body: <p>I am trying to insert some record into my Sql Server 2008 data base using javascript. But not happening.My code</p>
  
  <pre><code>try
          {
  
              var ConProv = new ActiveXObject("ADODB.Connection");             
              var ConnString ="Provider=SQLOLEDB;Data Source=SerevrName;Integrated Security=SSPI;Initial Catalog=text;User ID=xxx;Password=xxxx;";
              ConProv.Open(ConnString);
              var RecSet = new ActiveXObject("ADODB.Recordset");              
              var SqlSt = "insert into tbl_test(Col1,Col2) Values('Val1','Val2')";
  
              RecSet.ExecQuery(SqlSt, ConProv);
          }
          catch(err)
          {
            txt="Error description: " + err.description;    
            alert(txt);
          }
  </code></pre>
  
  <p>Error Message: Object does not suport this method or property..</p>
  
  <p>What is that I am missing...</p>
  
  <p>N.B. I know it is not a good approach of acessing DB but I am experimenting this an learning.</p>