I need to capture sql message upon successful execution of sql statement using vbscript. Here is my code.
Public Function ExecuteAPI_String(sql_Statement)
Dim num
On Error Resume Next
Set objRecordSet = objConnection.Execute sql_Statement,num,adExecuteNoRecords
If Err.Number <> 0 Then
ExecuteSQLStatement_String = Err.description
objRecordSet.Close
Err.Clear
Else
ExecuteAPI_String = num & "records were affected"
objRecordSet.Close
End If
ExecuteSQLStatement_String
orExecuteAPI_String
. – user692942