Skip to content

GetSqlData

Summary

Executes a Stored Procedure with a given parameter string and returns the data as a two-dimensional array.

If an error occurs, it will be returned in the array.

The Procedure also needs to be authorised. Please refer to the CREFLEXSQL function for more details.

Example

  ds = Range("SERVER_NAME").Value
  sp = Range("SP").Value
  myParams = Range("PARAMS").Value
  Range("A5:H103").Clear

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

  Range("A5:H103").Value = grid
Back to top