Originally posted by: SystemAdmin
Hi,
I am trying to call a map from a web application developed in C# in Visual Studio.Net. I have added a reference to dstxInterop.dll, that is included in the C# examples of the development kit for DataStageTx 7.5, to my solution and added the code below:
private void RunDSTXMap()
{
try
{
MFactoryClass imFactory = new MFactoryClass();
imFactory.InitializeAPI(null);
// Load the Map
string sMapPath = ConfigurationManager.AppSettings.ToString();
MMap map = imFactory.MapLoadFile(sMapPath);
map.Run();
string responseMessage = map.GetTextProperty(MConstants.MPIP_OBJECT_ERROR_MSG, 0);
int resuleCode = map.GetIntegerProperty(MConstants.MPIP_OBJECT_ERROR_CODE, 0);
string mapName = map.GetTextProperty(MConstants.MPIP_MAP_MAP_NAME, 0);
....more code here....
}
catch (Exception ex)
{
throw ex;
}
}
However I can't get passed the .InitializeAPI() line and I don't know why!
I keep getting the error message "Initialize Mercator API failed". Can anyone tell me what I am doing wrong?
Thanks
#IBM-Websphere-Transformation-Extender#IBMSterlingTransformationExtender#DataExchange