MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




server busy problem!

This is a discussion on server busy problem! within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi , I found a perfect solution on this website to solve the "server busy " error , by closing ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-22-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
server busy problem!

Hi ,

I found a perfect solution on this website to solve the "server busy " error , by closing all running mappoint processes.

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

This code is only working in VB.NET.

Can anyone please help to give alternative code in VB6?

Thanks a lot ,

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
  #2 (permalink)  
Old 12-22-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Server busy error

hi

Quote:
Can anyone please help to give alternative code in VB6?
i am also looking for the same..

Regards,
Lalit Goyal
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 12-25-2004
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

Quote:
Can anyone please help to give alternative code in VB6?
In traditional win32 code you can use the similar API calls FindWindow() to find the process window handle and to close it you can post a WM_QUIT message to it with PostMessage().

However killing the various active Mappoint instances will free up a lot of memory thus making all faster, and therefore less chance to get the 'server busy', so it is not _the_ solution to get rid of it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 12-30-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
The code in C#

This was an excellent idea.
I needed the same for my car navigation project, but it is written in C#, so I will post this for you:

Code:
Process[] procs;
procs = Process.GetProcessesByName("MapPoint") ;
if(procs.Length > 0)
{
	for(int i=0;i<procs.Length;i++)
	{
		procs[i].Kill() ;
		procs[i].WaitForExit();
	}
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 12-30-2004
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

or even more simple:

Code:
            Process[] processes = Process.GetProcessesByName("MapPoint");
            foreach (Process proc in processes)
                proc.Kill();
I also dont think you have to use WaitForExit because the process is killed as it will do same as task manger.
However be aware that if a user has started an instance of mappoint.exe this one is killed also !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 12-30-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
I Hope Next Mappoint fixes the 'Server Busy' BUG

I too have spent countless Dev hours using mappoint and love it. Recently when incorporating some longer queries, Started getting the 'Server Busy' stuff. Cannot seem to solve it as it is inconsistant. I don't want this message as the query always works and DB connection has it's own diagnostics anyway!! If their is a way to avoid this in VB6 I would be happy.

Any help very much appreciated
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 12-31-2004
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

The 'server busy' msg window comes when the calling (your) application does not respond to windows messages anymore. For example you will have this a lot if you step with the debugger trough the code.

Cleaning up mappoint.exe is helpfull whilst developping because a lot of time the program will not 'nice' terminating. In final fase it should not be done.

About the non responsive. If your program has many things to do in a closed loop then it should be into consideration to eather optimize it for speed, or run it in a background thread context. That way to not get the 'server busy' message.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 01-01-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
I appreciate the reply. I do understand what is going on. A bit disappointed that this ActiveX control behaves differently than others when intercepting events. Don't get Server Busy when I step through code relating to MSChart for instance.

Anyway, I did solve the problem by offloading the queries into a second thread context although I am now a little worried about side effects.

Thanks
ITview
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 01-02-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

Executing the lenghty code in a second thread is indeed the solution. You will have no side effects if the main application dont touch the data until the thread has finished his query.

a solution could be that the thread post a message to the main thread just before suspending (or destroying). the custom message handler in main thread can handle the data then.
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


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 03:52 AM
Server Busy Sylvain MapPoint 2006/2009 Discussion 21 09-18-2004 04:25 PM
Timer and Server Busy Anonymous MapPoint 2006/2009 Discussion 0 07-07-2004 02:59 AM
Server Busy Message fix in .Net matnace MapPoint 2006/2009 Discussion 0 05-11-2004 11:48 AM
Server busy ... svchost is 99% CPU Anonymous MapPoint 2006/2009 Discussion 1 10-17-2003 07:42 AM


All times are GMT -5. The time now is 02:42 PM.


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

Ski Family
Have you got something of a ski family? Holiday Hypermarket has a range of destinations which will accommodate all levels of skier. Check our online travel guides.

Travel Counsellors
Travel Counsellors are an award winning Travel Agent. Have a personal Travel Counsellor help with your travel plans.

Cuba Holidays
After years of neglect by the western world, Cuba is coming back onto the holiday scene. Cuba Holidays are a unique and enjoyable experience. Book at dealchecker.co.uk.

Holidays in Cyprus
Holidays in Cyprus are enriched by the abundance of churches, ruins and natural wonders. Book a holiday with us today!

Cheap Turkey Holidays
The best time of year to sneak in cheap Turkey holidays is during the off-peak season. Check out the great deals available during April, May or October. For other tips on how to bag a great value holiday simply check online at ulookubook.com

Travel Tickets
Travel tickets need not always be expensive. Check out your best travel comparison site, Travel.co.uk

Cheap holidays to Portugal
Enjoy a spectacular country at a fraction of the cost. Find information on cheap holidays to Portugal at On The Beach.


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