Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Server Busy

This is a discussion on Server Busy within the MapPoint Desktop Discussion forums, part of the Map Forums category; Does anyone know if there is an equivalent call to App.OleRequestPendingTimeout = TimeInMiliseconds for VBA....

  1. #11
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Server Busy - switch to retry

    Does anyone know if there is an equivalent call to
    App.OleRequestPendingTimeout = TimeInMiliseconds
    for VBA.

  2. #12
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Does somebody has found it allready in c#?

  3. #13
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    server busy

    I got the "Server Busy" error saying "This action could not be completed because (my app) is not responding". My C++ .NET app was processing an input file of GPS points. The error went away when I added some well placed "axMappointControl1->MousePointer;" lines in the loop.

  4. #14
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    server busy error solution

    Hi

    In .NET you can try

    Private Sub KillMapPointProcess()
    Dim proc As New Process
    Dim procs As Process()
    Dim i As Integer
    procs = proc.GetProcessesByName("MapPoint")
    If procs.Length = 0 Then Return 'MP wasn't loaded, so return
    For i = 0 To UBound(procs)
    procs(i).Kill()
    procs(i).WaitForExit()
    Next
    End Sub

    In VB6 I had the same problem until I closed ALL objects with = NOTHING

    Since then no problems anymore

    Wim

  5. #15
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Visual C++, Server Busy, Switch To...

    Hi,

    I have a VC++ project and embedded MapPoint as an ActiveX in a Dialog-Box.

    When I let MapPoint calculate a route between 2 points that are close to each other... everything works fine.

    As soon as I try a route between 2 points that are far away from each other -> the calculation takes more than 20 seconds (!!) and after that a "Server Busy, Switch To..." dialog is popping up.

    I tried all the things from
    http://support.microsoft.com/default...b;EN-US;248019

    But still I have the problem...

    Did anybody solve this in VC++ ?

    Thanks
    Gustav

  6. #16
    Joel is offline Junior Member White Belt
    Join Date
    Aug 2003
    Posts
    10

    VC++

    What I used to do when using MapPoint with C++ was to post a custom message to the parent window, when MapPoint fired an event. Then I would handle the custom message accordingly.

    i.e. If I wanted to calculate a route after the user has clicked a second spot on the map, I get the SelectionChanged event from MapPoint (or whatever the event is called, I forget). Then I post my own custom message (say WM_USER) to the control's parent window. Then on the handler for WM_USER, I have it calculate the route. MapPoint only seems to complain if you take too long handling an event that it launched. So by posting another event, and letting the MapPoint event terminate, it's happy.

    In C# now, I just have a timer (too lazy to play with posting messages) that I set to 50ms from a MapPoint event. Then the timer triggers the code I want to fire when as a result of the Map event.

    I hope this makes sense.

    Joel

  7. #17
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Hey Joel,

    Thanks a lot. I tried the "timer thing" - a possible solution you described.
    And it works! No more "Server Busy"-Dialogs!!!
    It really seems that MapPoint wants to terminate its own events quickly!

    Cool! Thank you.
    Gustav

  8. #18
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    help in vb .net

    Hi, I'm programming in vb .NET

    I read about a timer to solve the "server busy" problem.

    Could someone please help me to achieve this solution in VB.NET?

    I'm desperated.

    Thanks.

  9. #19
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Looks like Joel has the answer to the VBA code problem.

    What you want to do when handling events like:

    Code:
    Private Sub MPC_SelectionChange(ByVal pNewSelection As Object, ByVal pOldSelection As Object)
    is to exit the sub first, and then execute the code your want to run when the MapPoint event fires. That way you avoid the 20 second time-out.

    His solution is the only way I know how to do it: set a timer. Timers fire after the current procedure has finished executing, or upon a "DoEvents."

    You will find this technique useful for a lot of other reasons, so I suggest that you set up your timer event to handle a variety of procedures. To do this, declare a public variable for your form that can be accessed from outside the form.

    Let's say that the form that contains the MapPoint control is called "MapForm." Declare a public variable at the top of the MapForm code, like

    Code:
    Public TimerProc as String
    then, to handle the MapPoint ChangeSelection event, write


    Code:
    Private Sub MPC_SelectionChange(ByVal pNewSelection As Object, ByVal pOldSelection As Object)
    
    TimerProc = "SelectionChange"
    TimerInterval=1
    
    End Sub
    The code in the timer event should look like

    Code:
    Select Case TimerProc
    Case "SelectionChange"
    <insert the code the handle the SelectionChange event here>
    Case "MouseUp"
    <insert the code the handle the MouseUp event here>
    Case "ProcThatMustBeRunFromThisFormModuleButYouWantToCallfromOutside"
    <use the DoEvents command to get this code to run in-line from an external procedure.  The TimerProc variable is referenced as MapForm.TimerProc>
    End Select
    You might also need to set some form level variables to capture the values passed by MapPoint (pNewSelection, pOldSelection) so that you can reference them from the Timer Event.

  10. #20
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    VBA

    Don't forget to set

    Code:
    TimerInterval = 0
    above the

    Code:
    Select Case TimerProc
    code in the Timer Event

Page 2 of 3 FirstFirst 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Server is Busy
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 01-18-2005, 04:52 AM
  2. server busy problem!
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 8
    Last Post: 01-02-2005, 04:04 AM
  3. Timer and Server Busy
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-07-2004, 03:59 AM
  4. Server Busy Message fix in .Net
    By matnace in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 05-11-2004, 12:48 PM
  5. Server busy ... svchost is 99% CPU
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-17-2003, 08:42 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96