데이터 셋을 실행 하여 데이터를 받습니다.
public long DsExecute(string dbmsCode, string datasetName, Excel.Workbook wbobj, int maxRecord = 0){
} |
| Name | 동작명 | 비고 |
|---|---|---|
dbmsCode | dbms 코드 | |
datasetName | 실행할 데이터 셋 이름 | |
wbobj | 현재 Workbook object |
Return Value
Type: long
sql의 결과 값
SQL SELECT 처리를 위한 VBA 코드
Sub ExecuteTest()
Dim mxmodule As Object
Set mxmodule = Application.COMAddIns.Item("iMATRIX.ExcelModule").Object
mxmodule.xapi.DsExecute "mtxrpty", "DS", ActiveWorkbook
If mxmodule.xapi.LastErrorCode != 0 Then
MsgBox "쿼리 실행 오류 " & mxmodule.xapi.LastErrorMessage
Else
Range("a1").CopyFromRecordset mxmodule.xapi.LastRecordset
End If
Set rs = Nothing
End Sub |