title: execute stored procedure in google apps script
body: <p>I am using the below code in google apps script to insert employee record from a Google Sheet into a mysql database.
  The stored procedure [dbo].[insertemployee] accepts "@empname" parameter.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  var empname = 'test';
    var mysqldbconn = Jdbc.getConnection(url,username,password);
    var mysqlquery = mysqldbconn.createStatement(); 
    callstoredprocedure = "{call [dbo].[testemployee](?)}";
    mysqlquery = mysqldbconn.prepareCall(callstoredprocedure);
    
    mysqlquery.setString(1, empname);
    mysqlquery.executeUpdate();</code></pre>
  </div>
  </div>
  </p>
  
  <p>This gives me this error "Must declare the scalar variable "@empname"".</p>