【发布时间】:2017-10-05 22:57:19
【问题描述】:
我需要在使用 vbscript 成功执行 sql 语句后捕获 sql 消息。这是我的代码。
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或ExecuteAPI_String收到的结果消息会很有帮助。