Click or drag to resize

Table Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Represents a table in a TransactionalRepository. In turn, a table represents a number of Record objects. Use CreateTable(String) or Tables to obtain an instance.
Inheritance Hierarchy
SystemObject
  Telogis.GeoBase.TransactionalTable

Namespace:  Telogis.GeoBase.Transactional
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public class Table : IDisposable

The Table type exposes the following members.

Properties
  NameDescription
Public propertyFields
Gets all the Fields and associated field DataType.
Public propertyIndexes
Returns an IndexCollection representing all the Indexes in this Table.
Top
Methods
  NameDescription
Public methodAddField
Adds a new column to this table.
Public methodCreateIndex
Creates a new index on this table.
Public methodCreateRecord
Creates a new Record for this table. This does not insert the record into the database; this should be done after populating the Record by calling Insert(Record).
Public methodDelete(IEnumerableRecord)
Deletes one or more records from the table.
Public methodDelete(Record)
Deletes one or more records from the table.
Public methodDeleteAll
Delete all existing records in the table.
Public methodDispose
Disposes of this Table. This does not delete the table from the TransactionalRepository. Ordinarily, there is no need to call this method directly, Dispose should be called instead.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInsert
Inserts a record into this table.
Public methodQueryAll
Fetch all of the records in the table.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Update an existing record in the table
Top
Examples
When you create a table you must define the table structure. For example, the following code snippet creates a table that has two columns: a customer name (string) and a warehouse location (LatLon). Typically, you will only create a table and columns when creating a transactional repository. See TransactionalRepository(String) for an example.
C#
using (EnsureTransaction trans = new EnsureTransaction(myTransactionalRepository)) {
    Table warehouse = myTransactionalRepository.CreateTable("Warehouse");
    warehouse.AddField("CustomerName", DataType.String);
    warehouse.AddField("Location", DataType.LatLon);
}
To obtain an instance of a table, use the Tables property of a transactional repository:
C#
Table warehouse = myTransactionalRepository.Tables["warehouse"];
Note that, like column names, the name of the table is not case sensitive.
See Also