MapInfo Pro Developers User Group

Welcome to the MapInfo Pro Developers community!  We are a group dedicated to the discussion and understanding of MapBasic and .Net MapInfoPro AddIn development. Bring your questions and ideas here. This group includes several members of the Pro development team from around the world.

Please feel free to start a discussion in the discussion tab or join in a conversation.

Product Information  Ideas Portal  MapInfo Community Downloads

Discussions

Members

Resources

Events

 View Only
  • 1.  Selection of an indexed field not finding items in MI v16.0.2

    Posted 01-25-2018 15:41
      |   view attached

    I have a table with multiple rows of data deleted, but without the table being packed.

    Using MI v16.0.2 a select command often doesn't locate the data if it is past a lot of deleted rows. I think the index is getting corrupted but am uncertain why.

    Also are indexes being generated differently within MIv16 as some tables cannot then be opened in much earlier versions of MapInfo. It states that the IND was built using a different language.

    Attachment(s)

    zip
    Mark233.zip   25 KB 1 version


  • 2.  RE: Selection of an indexed field not finding items in MI v16.0.2

    Posted 01-26-2018 12:00

    Hi Reniel,

    Unfortunately the tables may be viewed by more than one person.

    Packing the table does normally solve the issue but will cause the layer to disappear off the screen which we could control for the person doing the deletion.

    But for those users just viewing the data, they would loose the layer off the map and probably get an error message.

    But it doesn't answer the question as to why the indexes are getting corrupted or that they are possibly a different format to earlier versions of MapInfo.

    Also what I didn't mention is that these particular tables are also being edited using MapX5.0 via another application, so I suppose that could be the issue. The only solution I can see is to remove the indexes off the tables being edited.

    Thanks



  • 3.  RE: Selection of an indexed field not finding items in MI v16.0.2

    Employee
    Posted 01-28-2018 09:32

    Was the table created by some other application other than MIPro? Wondering if it was created by a library such as MITAB. I don't know what query you ran against this table, but I was able to use Find to locate records past the deleted ones. I was using 16.02 as well as 17.0

    I would either pack this existing table or export to MIF and reimport and that will rebuild everything.

     

    Thx,

    -Bill



  • 4.  RE: Selection of an indexed field not finding items in MI v16.0.2

    Posted 01-29-2018 02:32

    Hi Reniel & Bill.

    I'll send the table to tech support but I thought they were also looking at these groups.

    The table was created using MI v16.0.2 but was done using a 'save as ' command, based upon a table created in an earlier version of MapInfo. It was also edited using an application written in VB6 using MapX5.

    I was using a simple sql select statement: 'select * from mark223 where item_ref = 3724'

    It returns ' No records selected'. It works on any other field in the table as they are not indexed.

    David



  • 5.  RE: Selection of an indexed field not finding items in MI v16.0.2

    Employee
    Posted 01-29-2018 06:37

    Tried this in 15.02 (32 bit) as well and it also did not select any records.

    Soon as I drop the index on this markingref column, the two records were selected.

    select * from Mark233 where markingref = 3724



  • 6.  RE: Selection of an indexed field not finding items in MI v16.0.2

    Posted 01-29-2018 07:09

    I've found the issue repeats on a table without any deletions.

    If you create a table using MIv16 which has an indexed field, then it can't be opened in MIv8.5, which is about the same era as MapX. But it does work ok with a table created in MIv15

    So I think the way that MI v16 is creating indexes has changed slightly and MapX is then corrupting them.

    Once the index is dropped and rebuilt in v16 then data can be selected correctly.

    If this is not seen as a bug (which I can appreciate as MapInfo is now in a .net environment, so any non .net versions of MapInfo shouldn't necessarily be able to link to this table) then we will need to alter our code to drop any indexes and rebuild them as required.

    Thanks



  • 7.  RE: Selection of an indexed field not finding items in MI v16.0.2

    Employee
    Posted 02-02-2018 05:36

    We have someone in Engineering looking into this currently. Thx