MapWindow Home
Search MapWindow.org


  • Home
    • Download
    • Why MW
    • FAQ
    • Contact
  • Products
    • MapWindow
    • ActiveX
    • Plug-ins
  • Software Dev
    • Sample Code
    • Scripts
    • Source
    • Bugs
    • Support
    • Languages
  • Site Tools
    • Forums
    • Tutorials
    • Mailing Lists
    • Team
    • Site Stats
    • Links
  • Get Stuff
    • Buy a CD
    • Buy a T-Shirt
    • MW Book
    • ActiveX Book
    • Donate
    • Buy Support
  • Documentation
    • MWGIS App. User Guide
    • GISTools User Guide
    • MW Plug-ins Dev. Guide
    • MWGIS ActiveX Dev. Guide
    • MWGeoProc Dev. Guide

MapWinGIS:Table EditReplaceField

From MapWindow GIS

Jump to: navigation, search

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://www.mapwindow.org/wiki/index.php/MapWinGIS:Table_EditReplaceField"
Views
  • Page
  • Discussion
  • View source
  • History
Personal tools
  • Log in / create account
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link

Geospatial Software Lab

Copyright © 2008 - MapWindow Open Source Team
( last updated: November 12 2008.)
Home | Donate | Download | MapWindow GIS Desktop | MapWinGIS.ocx | Plug-ins | Contact | Lists | Bugs | Sample Code | Documentation
Code Repository | Open Source License | Discussion Forum | Wiki | Join the Team | Site Statistics | Links