title: return database message on successful sql execution using VBScript
body: <p>I need to capture sql message upon successful execution of sql statement using vbscript. Here is my code. </p>
  
  <pre><code>Public Function ExecuteAPI_String(sql_Statement)
  Dim num 
  On Error Resume Next
  Set objRecordSet = objConnection.Execute sql_Statement,num,adExecuteNoRecords
  If Err.Number &lt;&gt; 0 Then
      ExecuteSQLStatement_String = Err.description
      objRecordSet.Close
      Err.Clear
  Else
      ExecuteAPI_String = num &amp; "records were affected"
      objRecordSet.Close
  End If
  </code></pre>