I am trying to implement the equivalent of a VB program in python using COM. Here are the relevant lines from the VB program:
eConCall = New Microsoft.Dynamics.GP.eConnect.eConnectMethods
eConCall.eConnect_EntryPoint(sConnectionString, EnumTypes.ConnectionStringType.SqlClient, myXmlDocument, EnumTypes.SchemaValidationType.None)
In Python, I do:
import win32com.client
eConCall = win32com.client.Dispatch("Microsoft.Dynamics.GP.eConnect.eConnectMethods")
but eConCallhas no method eConnect_EntryPoint. In fact, it has no methods:
eConCall = win32com.client.gencache.EnsureDispatch("Microsoft.Dynamics.GP.eConnect.eConnectMethods")
dir(eConCall)
Print
['CLSID', '_ApplyTypes_', '__doc__', '__eq__', '__getattr__',
'__init__', '__module__', '__ne__', '__repr__', '__setattr__',
'_get_good_object_', '_get_good_single_object_', '_oleobj_',
'_prop_map_get_', '_prop_map_put_', 'coclass_clsid']
I am sure I donβt understand how Dispatch should be used and how I should access eConnectMethodsPython. Can a good soul help me? How do I get an instance of eConnectMethods so I can call it eConnect_EntryPoint?
source
share