MapWinGIS:Table EditReplaceField
From MapWindow GIS
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
















