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 4 of 4

Big problem with "get_item" method :((

This is a discussion on Big problem with "get_item" method :(( within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, I have a problem when I use the get_item method with recordset for example this source code is Ok: ...

  1. #1
    Elbarto is offline Junior Member Yellow Belt
    Join Date
    Mar 2006
    Posts
    13

    Big problem with "get_item" method :((

    Hello,

    I have a problem when I use the get_item method with recordset

    for example this source code is Ok:

    Code:
    string t;
    t= "City";
    object index = t;
    line=rs.Fields.get_Item(ref index).Value.ToString()
    but with this another example it doesn't work, it give a crash under MapPoint :

    Code:
    object index = tab[2].ToString();
    line=rs.Fields.get_Item(ref index).Value.ToString()
    if I use a variable ( array of string ) then it doesn't work, it work only if the string is hardcoded in source code ( for example t="City" )

    do you have a solution for this problem ?

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

    I did a test, but not exacly the same as you, but this works without exception:

    Code:
                string[] aS = new string[2];
                aS[0] = "My Pushpins";
                o = aS[0];
                rs = mp.ActiveMap.DataSets.get_Item(ref o).QueryShape(s);

  3. #3
    Elbarto is offline Junior Member Yellow Belt
    Join Date
    Mar 2006
    Posts
    13
    Hi,

    in fact all is ok now,

    my problem was in fact a bad value in some fields ( null values that gives an exception in MapPoint ) ,

    with a try/catch the bug is fixed in my source code

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

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. MapPoint "There was a problem opening ..." With Or
    By eric.hill in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 04-03-2006, 09:48 PM
  2. addin-form with behavior as "Extras-Geopositon"-fu
    By Th.M.Mädzulat in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 12-20-2005, 10:37 AM
  3. Mapppoint 2003 EULA vs "Fleet Applications"
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 9
    Last Post: 04-17-2004, 03:03 PM
  4. Do I need "Autoroute Europe", if I install "M
    By bigtail in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-24-2004, 12:58 AM
  5. How ImportData method with "Password-protected" a
    By rrosenhagen in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 12-10-2002, 04:13 PM

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