Community of VE/MapPoint Users and Developers
This is a discussion on DataSet.Paste: Exception from HRESULT: 0x80040E04 (vb.NET) within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Below is a code snippet that takes lat/lon data from a database and plots it on MapPoint 2004. This sub ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| DataSet.Paste: Exception from HRESULT: 0x80040E04 (vb.NET) Method: Paste StackTrace: at MapPoint.DataSet.Paste() Message: Exception from HRESULT: 0x80040E04 Has anyone seen this before? Any suggestions? Thanks, Thomas Dim oMap As MapPoint.Map Dim oLoc As MapPoint.Location Dim oPushpin As MapPoint.Pushpin Dim oDS As MapPoint.DataSet Dim oRoute As MapPoint.Route 'Query Database sdst = SqlHelper.ExecuteDataset(UserSettings.ConnString, "getMobileHistory", SqlHelper.ExecuteScalar(UserSettings.ConnString, "getMobileIDFromName", Mobile), CDate(dt1.Text & " " & dt2.Text), CDate(dt3.Text & " " & dt4.Text), eList) 'Initialize MapPoint objects oMap = Map.MapCtl.ActiveMap oMap.Saved = True oRoute = oMap.ActiveRoute 'Set Up Map for pushpin dataset oMap.DataSets.AddPushpinSet(Mobile) oDS = oMap.DataSets(Mobile) oDS.Symbol = 256 oDS.Select() 'cycle through DataSet For jj = 0 To sdst.Tables(0).Rows.Count - 1 latitude = sdst.Tables(0).Rows(jj).Item(2) longitude = sdst.Tables(0).Rows(jj).Item(3) oLoc = oMap.GetLocation(latitude, longitude, 1) oRoute.Waypoints.Add(oLoc, CStr(i + 1)) oPushpin = oMap.AddPushpin(oLoc) oPushpin.Note = "Vehicle: " & Mobile & vbNewLine & _ "Time: " & LogTime & vbNewLine & _ "Event: " & EventName & vbNewLine & _ "Heading: " & Heading & vbNewLine & _ "Speed: " & Speed & vbNewLine oPushpin.Name = i oPushpin.Symbol = symbol oPushpin.Cut() oDS.Paste() i = i + 1 Next |
| |||
|
Hi, Difficult to say. But.. there is no such thing as 'random error' in software. It will happen in a certain condtion. However with a loose pointer it can be more or less random (in time). You have to find out first witch line of code is the offending one. Then when you know that you can search for the differences.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, I never had this error, but from what I see in the message: HRESULT, is telling me that Result is a windows handle. So could be that a certain handle is overwritten, or used by another thread (if your program is multithread). I always liked to debug the 'seemignly random' errors from colleguas of me, to show them that there is no sutch thing as 'random' To begin with if you have multiple threads, go single thread and see if you have still the same problem. Then simplify until you have a demo with no more code to show the problem. By then you probably have found it yourself, but pleas feedback here Sorry but that is really all the help I can give ...
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OutOfMemory Exception | Gianmaria | MapPoint 2006/2009 Discussion | 1 | 01-24-2006 12:26 PM |
| Regarding COM exception at the end of execution... | Anonymous | MP2K Magazine Articles | 0 | 05-12-2005 12:23 PM |
| Cut and Paste Problem with Word 2003 and MapPoint 2004 | brubli | MapPoint 2006/2009 Discussion | 0 | 10-21-2004 04:26 PM |
| Dataset Copy/Paste | indmillert | MapPoint 2006/2009 Discussion | 3 | 11-10-2003 04:10 PM |
| Problems with copy and paste of user-defined territories | Ute | MapPoint 2006/2009 Discussion | 2 | 04-14-2003 11:38 AM |
Menorca Flights
Visit the unspoilt Mediterranean island of Menorca. Menorca flights are low cost flights when you book with Holiday Hypermarket.
Flights to Spain
Find cheap flights to Spain on Travel Counsellors. A personal Travel Counsellor can help you plan flights and find accommodation in Spain.
Thailand Holidays
Thailand Holidays can suit your budget when you book with dealchecker.co.uk. If you are strapped for cash, visit online to find the deal for you.
Jamaica Holidays
Jamaica holidays give you the chance to enjoy the vibrant cultural heritage and wonderful laid back atmosphere of the Caribbean. Book here!
Egypt
In Egypt you find an ancient city buzzing with life. There is an abundance of historical sites to see, not just the pyramids. The Opera House is certainly worth a visit and you can enjoy some open-air theatre too.
Cheap Travel
Travel.co.uk has some excellent offers on cheap travel. Click here.
Cheap Sharm el Sheikh Holidays
Visit the Red Sea Riviera! Info on cheap Sharm el Sheikh holidays, found at On The Beach.