Skip to content

GetSqlData

Summary

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

If and error occurs, it will be returned in thr array.

The Procedure also needs to be authorised. Please have a look at the CSQLReflex 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