Вот так сработало. Вроде.
Sub testBatch()
On Error GoTo testBatch_error
Dim axapta As AxaptaCOMConnector.axapta
Dim cac As COMAdminCatalog
Dim axR1 As IAxaptaRecord
Dim axR2 As IAxaptaRecord
Dim res As Object
Dim i As Integer
Set axapta = New AxaptaCOMConnector.axapta
axapta.Logon "glibs", "", "", "AxGleb-30-ru"
Set axR1 = axapta.CreateRecord("CustTable")
Set axR2 = axapta.CreateRecord("CustGroup")
axapta.ExecuteStmt "SELECT * FROM %1 JOIN %2 WHERE %1.CustGroup == %2.CustGroup && %2.CustGroup == 'ХХХ'", axR1, axR2
While axR1.Found
MsgBox CStr(axR1.Field("Name"))
axR1.Next
Wend
Set cac = New COMAdminCatalog
cac.ShutdownApplication ("Navision Axapta Business Connector")
Set cac = Nothing
Set axapta = Nothing
testBatch_exit:
Exit Sub
testBatch_error:
MsgBox Err.Description
GoTo testBatch_exit
End Sub
__________________
С уважением,
glibs®
|