MapWinGIS:Table EditReplaceField

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy

EditReplaceField

Replaces the specified field in the table with the new field. Note: The table must be set to allow editing before a field can be replaced in the table.
See also Field and StartEditingTable


VB.NET Usage

Function EditReplaceField(FieldIndex As Integer, NewField As MapWinGIS.Field, cBack As MapWinGIS.ICallback) As Boolean

            Parameters

FieldIndex

The index of the field to be replaced.
NewField The field to be used to replace the specified field in the table.
cBack The ICallback object which will receive progress and error messages while the specified field is being replaced by the new field.
ReturnValue A boolean value representing the success or failure of replacing the specified field.

Sample Code

    Private Sub TableReplaceField()
        Dim table As New MapWinGIS.Table()
        Dim field As New MapWinGIS.Field()
        Dim success As Boolean
        'Open a table
        success = table.Open("C:\test.dbf")
        'Start editing the table
        success = table.StartEditingTable()
        'Replace field 0 with the new field
        success = table.EditReplaceField(0, field, Me)
    End Sub
  

VB 6 Usage
Function EditReplaceField(FieldIndex As Long, NewField As Field, cBack As ICallback) As Boolean
            Parameters

FieldIndex

The index of the field to be replaced.
NewField The field to be used to replace the specified field in the table.
cBack The ICallback object which will receive progress and error messages while the specified field is being replaced by the new field.
ReturnValue A boolean value representing the success or failure of replacing the specified field.

Sample Code

    Private Sub TableReplaceField()
        Dim table As New MapWinGIS.table
        Dim field As New MapWinGIS.field
        Dim success As Boolean
        'Open a table
        success = table.Open("C:\test.dbf")
        'Start editing the table
        success = table.StartEditingTable()
        'Replace field 0 with the new field
        success = table.EditReplaceField(0, field, Me)
    End Sub

Retrieved from "http://mapwindow.org/wiki/index.php/MapWinGIS:Table_EditReplaceField"

This page has been accessed 1,378 times. This page was last modified on 9 November 2005, at 17:43.