Click or drag to resize

TransactionalRepositoryCreateTable Method

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Creates a new table in the TransactionalRepository.

Namespace:  Telogis.GeoBase.Transactional
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public Table CreateTable(
	string name
)

Parameters

name
Type: SystemString
The name of the table to create. There must not be an existing table with this name. The name will be converted to lowercase.

Return Value

Type: Table
The newly created table.
Remarks

This method must be called using a current transaction (see example).

Whenever a new table is created, GeoBase automatically adds an "id" field. The "id" is a unique identifier within the table for each record in the table. This field cannot be modified.

Examples
An exception will be thrown if you try to recreate a table that already exists. For many applications it is sufficient to only create any necessary tables when you initialize your transactional repository. See the example for the transactional repository constructor.
C#
using (EnsureTransaction trans = new EnsureTransaction(myTransactionalRepository)) {
// creates a new table named 'warehouses'
    Table myTable = myTransactionalRepository.CreateTable("Warehouses"); 
    ...
}
See Also