MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Server Busy

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


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 05-07-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Server Busy - switch to retry

Does anyone know if there is an equivalent call to
App.OleRequestPendingTimeout = TimeInMiliseconds
for VBA.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12 (permalink)  
Old 05-17-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Does somebody has found it allready in c#?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13 (permalink)  
Old 06-15-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14 (permalink)  
Old 06-16-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15 (permalink)  
Old 06-23-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16 (permalink)  
Old 06-24-2004
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17 (permalink)  
Old 07-06-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #18 (permalink)  
Old 07-07-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #19 (permalink)  
Old 08-11-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #20 (permalink)  
Old 08-11-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
VBA

Don't forget to set

Code:
TimerInterval = 0
above the

Code:
Select Case TimerProc
code in the Timer Event
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
busy, server


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 12:28 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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