Skip to content

ExecSqlProc

Summary

Executes a Stored Procedure with a given parameter string and returns a string with the result.

If and error occurs, it will be returned in the string.

The Procedure also needs to be authorised. Please have a look at the CExecStoredProc  function for more details.

Example

  ds = Range("SERVER_NAME").Value
  sp = Range("SP").Value
  myParams = Range("PARAMS").Value

  Range("A5:H103").Clear

  t = Now()

  Dim val
  With Application.COMAddIns("Calumo.ExcelClient").Object
    val = .ExecSqlProc(ds, sp, myParams)
  End With

  Range("A5").Value = val