Luegisdorf
2/10/2006 7:56:00 AM
Hi PacMan
It's possible what you want to do. The only restriction is, that the
'normal' Axapta client which is calling the thrid party COM has different
transaction and cache system (because the Axapta COM has its own session).
The other possiblity is (but only if your concept is a little bit foo) to
generate endless loop (axapta calls com, com calls axapta, calls com, calls
axpata ....).
And onther hint: COM communication is more than slow. If you plan to execute
big actions executed by COM the users needs a lot of time and patience ;-)
Best regards
Patrick
"PacMan" wrote:
> Hi,
>
> Is it possible to instantiate an external COM object from within Axapta, and
> then from within that COM object, instantiate the Business COnnector?
>
> For example:
>
> in axapta:
> COM ClassA = new COM('someDLL.form1');
>
> and then in the someDLL, we have code like this:
> Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
> Handles MyBase.Load
> 'connect to Axapta via COM connector
> Axapta = New AxaptaCOMConnector.Axapta
> Axapta.Logon("Admin", "", "", "")
> End Sub
> Private Sub DoSomething()
> Dim AxaptaQuery As AxaptaCOMConnector.IAxaptaObject
> Dim AxaptaQueryRun As AxaptaCOMConnector.IAxaptaObject
> Dim AxaptaDataSource As AxaptaCOMConnector.IAxaptaObject
> Dim ItemTableBuffer As AxaptaCOMConnector.IAxaptaRecord
> Dim VendTableBuffer As AxaptaCOMConnector.IAxaptaRecord
> 'create a query and call that query
> ....
> 'do something else with the Business connector
> End Sub
> Axapta.Logoff()
>
> Can we do sort of a 2-way thing? Axapta calls com object, com object calls
> Axapta? or is there any conflict?
>
> Thanks!