Hello folks,
Having trouble with a what should be a simple com+ wrapper for a .NET CSLA function. Here's the code within the wrapper:
public void SendMessage(string subject, string parms, int msgTypeID)
{
Hashtable keys = new Hashtable();
string[] pairs = parms.Split('|');
foreach(string pair in pairs)
{
string[] each = pair.Split('?');
keys.Add(each[0], each[1]);
}
Message.SendMessage(subject, keys, msgTypeID);
}
Message.SendMessage is the CSLA function we created that I'm trying to call. I'm calling this from a Visual Basic 6 application (yes, I know, but we're stuck with it for now), and anytime I try and call the ComWrapper.SendMessage function I'm getting the following error:
Err.Number = -2146233088
Err.Description = DataPortal.Fetch failed
Any help or insight would be VERY appreciated... even if it's to tell me I'm wasting my time and it can't be done.
Thanks in advance,
E
You aren't given a lot of information about what this SendMessage() does - but I am guessing that it creates an instance of a business object? And that occurs by calling the data portal?
What you need is to get at the full stack trace (or use a newer version of CSLA) so you get better information about the actual exception that occurs.
My first guess though, is that you don't have a config file for your VB6 app, so your data access code is probably failing to get a connection string and so throws an exception. The .NET runtime looks for xxxxx.exe.config - even if xxxxx.exe is a VB6 app.
Exactly right, sir. Thank you much. However, when I was running it through the debugger, it did not work. I had to compile the app and run it on its own to actually get it to run through the code. I wonder if vb.exe would need the config file for it to run through the debugger.
Anyway, I'll take it. Thanks again.
E
Copyright (c) Marimer LLC