Server Busy "Switch to" problem (C#)

Trips

Well-known member
Joined
Aug 7, 2010
Messages
2,788
I hope this is the right forum.
But I have the following problem i have an application wich uses a COM object.
In one of my methods I Ask the com object for an article id. The com object displays a dialog where the user can sellect the right one.
If the user waits to long he gets the message Server is busy "Switch to" how can I prevent it that this message is thrown.
I Use the following code so far.
<div style="background-color:white; color:black
<pre><span style="color:blue public <span style="color:blue class ERPConnectionRidder8 : IErpConnection
{
<span style="color:blue private RidderApplication application;
<span style="color:blue #region IErpConnection Members

<span style="color:blue public <span style="color:blue object FindArticle()
{
IRidderTable articleTable = application.CreateR8Table(<span style="color:#a31515 "ARTIKEL");
<span style="color:blue object articleNumber = application.ShowBrowse(<span style="color:#a31515 "ARTIKEL", articleTable, <span style="color:#a31515 "ARTIKELNUMMER");

<span style="color:blue return articleNumber;
}

<span style="color:blue public <span style="color:blue bool Login(<span style="color:blue string user, <span style="color:blue string password, <span style="color:blue bool showLogin)
{
<span style="color:blue if (application == <span style="color:blue null)
{
application = <span style="color:blue new RidderApplication();
}
<span style="color:blue return application.Login(user, password, <span style="color:#a31515 "001", showLogin);
}

<span style="color:blue public <span style="color:blue void Logout()
{
application.Logout();
}

<span style="color:blue #endregion
}
[/code]

The FindArticle Method is causing the problems when called


View the full article
 
Back
Top