--- In [EMAIL PROTECTED], "gunnark75" <[EMAIL PROTECTED]>
wrote:
> Hi, i'll try to call an Axapta Job from a C# Programm.
> VB6 works. Could some one give me tip, or short example ?
>
> thx

Hi Gunnar,

look at this. It's VB.Net but should be very easy for you to do it
in C#, it's just the same. Don't forget to add a reference to axapta
com connector in your c# project.

Dim ax As AxaptaCOMConnector.Axapta2
Dim obj As AxaptaCOMConnector.IAxaptaObject
Dim resultobj As AxaptaCOMConnector.IAxaptaObject
Dim i as Integer

ax = CreateObject("AxaptaCOMConnector.Axapta2")
ax.Logon(mAxaUser)
' Create the Object you want to call
obj = ax.CreateObject("YourClass")

'In this case Axapta returns an object with the result data, depends
on your implementation in Axapta
resultobj = obj.Call("MethodName", "Parm1")

'by calling the method you receive the data contained by the
resultobject
i = resultobj.Call("MethodName")
ax.Logoff()

Hope it helps!

cu
M



Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to