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
Results 1 to 7 of 7

OLE error 80040E04 when using QueryAllRecords or QueryCircle

This is a discussion on OLE error 80040E04 when using QueryAllRecords or QueryCircle within the MapPoint Desktop Discussion forums, part of the Map Forums category; I randomly get an OLE error 80040E04 whenever I use the QueryAllRecords or QueryCircle method of a dataset. Has anyone ...

  1. #1
    stephenmillington is offline Member Yellow Belt
    Join Date
    Jun 2004
    Posts
    40

    OLE error 80040E04 when using QueryAllRecords or QueryCircle

    I randomly get an OLE error 80040E04 whenever I use the QueryAllRecords or QueryCircle method of a dataset. Has anyone else experienced this and is there a reason/solution ?

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

  3. #3
    sthurlock is offline Junior Member Yellow Belt
    Join Date
    Dec 2003
    Posts
    12

    Re: OLE error 80040E04 when using QueryAllRecords

    I recently wrote some new code and started seeing this. Did you happen to find a work around for this problem?

  4. #4
    stephenmillington is offline Member Yellow Belt
    Join Date
    Jun 2004
    Posts
    40
    Unfortunately no. The error appears completely randomly, even using the same data, sometimes I get no errors and others times I do get an error - it is very frustrating. I get the impression that either using OLE at all or specifically Mappoint isn't entirely stable

  5. #5
    sthurlock is offline Junior Member Yellow Belt
    Join Date
    Dec 2003
    Posts
    12
    Given that it seems random, I was going to try:
    1) do some other queries first and then come back to this one.
    2) put a loop around the try/catch for the query and loop until it works
    3) #2 but with waiting a small amount of time.

    Have you tried any of these with any success?

  6. #6
    stephenmillington is offline Member Yellow Belt
    Join Date
    Jun 2004
    Posts
    40
    not as yet - i do plan on trying it x number of times and raising the exception if it fails after this many. If you find this works please let me know.

  7. #7
    sthurlock is offline Junior Member Yellow Belt
    Join Date
    Dec 2003
    Posts
    12
    I was able to get it to work with my testcase (56 separate datasets, each one queried 30 times) by catching the error and then retrying after I had finished processing the other datasets. There were 11 failures, none of which failed on the second query. Here is what is used. I will post again if I find this is not working with other sets of data.

    -sthurlock


    Code:
       'for/next - set all locations in skipped_routes to True 
       routes_left_to_process = True
    
       Do While routes_left_to_process = True
          routes_left_to_process = False    ' this will be reset in the catch below if there are 
          '                                   any problems w/Queryallrecords else drop out of while loop
          For r = 1 To n
             If skipped_routes(r) = True Then
                skipped_routes(r) = False     ' will be set in the catch if there are problems and it has to be retried.
                fStreamWriter.WriteLine("   " & MPMap.DataSets(routes(r)).Name & " r = " & r)
                Try
                   rs = MPMap.DataSets(routes(r)).QueryAllRecords() 
                Catch ex As Exception
                   fStreamWriter.WriteLine("Error occurred: " & ex.Message & " " & ex.ToString)
                   routes_left_to_process = True
                   skipped_routes(r) = True
                   GoTo label_next_r
                End Try
           ...etc, etc...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. QueryCircle
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-26-2004, 11:59 AM
  2. QueryCircle
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-24-2003, 11:12 AM
  3. QueryAllRecords Fails
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-25-2002, 06:09 PM
  4. QueryAllRecords Fails
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 08-29-2002, 06:08 PM
  5. --VB DEVELOPER-- The method QueryAllRecords of a d....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 05-27-2002, 08:50 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