MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




Big problem with "get_item" method :((

This is a discussion on Big problem with "get_item" method :(( within the MapPoint 2006/2009 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: ...


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

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



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-08-2006
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 ?
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 03-08-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
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);
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 03-08-2006
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
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 03-09-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Hi,

cool
Glad it works
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
big, getitem, method, problem


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
MapPoint "There was a problem opening ..." With Or eric.hill MapPoint 2006/2009 Discussion 2 04-03-2006 08:48 PM
addin-form with behavior as "Extras-Geopositon"-fu Th.M.Mädzulat MapPoint 2006/2009 Discussion 0 12-20-2005 09:37 AM
Mapppoint 2003 EULA vs "Fleet Applications" Anonymous MapPoint 2006/2009 Discussion 9 04-17-2004 02:03 PM
Do I need "Autoroute Europe", if I install "M bigtail MapPoint 2006/2009 Discussion 1 03-23-2004 11:58 PM
How ImportData method with "Password-protected" a rrosenhagen MapPoint 2006/2009 Discussion 0 12-10-2002 03:13 PM


All times are GMT -5. The time now is 03:32 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Costa Brava Holiday
Beautiful kilometres of sandy beaches await you should you choose a Costa Brava holiday through UlookUbook!



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