Other Software and Data

 View Only
  • 1.  Update MI_Style problem in a Temp table !

    Posted 01-13-2020 05:17
    Hi,

    I am using MapXtreme 8.1 in a Visual Studio .Net 2015 program.

    If the temp table is open but not in a map, the update runs propertly.
    But if the temp table is in the map (visible or not is the same), the update crash

    The error is:  Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    Thank you!

    This is the code...

    Private Sub btnActualizar_Click(sender As Object, e As EventArgs) Handles btnActualizar.Click
    Dim oCatalog As Catalog = Session.Current.Catalog
    Dim li_q_filas As Integer

    Try
    Dim oMITable_LineasTemp As Table = oCatalog.GetTable("LineasTemp")

    '------------------------------------------------------------
    ' Update Style
    '------------------------------------------------------------
    Dim oMIStyle As New MapInfo.Styles.SimpleLineStyle(New LineWidth(3, MapInfo.Styles.LineWidthUnit.Pixel), 4, Color.Black)
    Dim oMIConnection As New MapInfo.Data.MIConnection

    oMIConnection.Open()

    Dim oMICommand As MapInfo.Data.MICommand = oMIConnection.CreateCommand
    oMICommand.CommandText = "Update LineasTemp Set MI_Style = @style Where Tipo_Aislacion = 'Desnudo'"
    oMICommand.Parameters.Add("@style", oMIStyle)

    li_q_filas = oMICommand.ExecuteNonQuery()
    MsgBox(li_q_filas)

    '------------------------------------------------------------
    '  Close connections
    '------------------------------------------------------------
    oMICommand.Dispose()
    oMIConnection.Close()

    Catch ex As Exception
           MsgBox(ex.Message)
    End Try
    End Sub

    ------------------------------
    Alejandro Hernandez
    Information Technology & Services
    ITS SA (GBD)
    Buenos Aires
    ------------------------------


  • 2.  RE: Update MI_Style problem in a Temp table !

    Employee
    Posted 01-13-2020 18:49
    I have forwarded your issue on to our mxt team. @Dinesh Ahuja should get someone to respond. I could not find a MapXtreme community.

    A few things to try.
    Make it a permanent table instead of temp.​
    Change the type of table, you could use native or mem table.

    -Bob

    ------------------------------
    Bob Fortin
    Software Architect and Distinguished Engineer
    MapInfo Pro Development Team
    ------------------------------



  • 3.  RE: Update MI_Style problem in a Temp table !

    Posted 01-14-2020 04:51
    Hi Bob,

    Thank you, but I need to use Temp tables because of the fast updates.
    I wait the MapxTreme team answer.

    Alejandro

    ------------------------------
    Alejandro Hernandez
    Information Technology & Services
    ITS SA (GBD)
    Buenos Aires
    ------------------------------