TransactionalRepositoryCreateTable Method | |
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Namespace:
Telogis.GeoBase.Transactional
Assembly:
geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax public Table CreateTable(
string name
)
Public Function CreateTable (
name As String
) As Table
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:
TableThe 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.
using (EnsureTransaction trans = new EnsureTransaction(myTransactionalRepository)) {
Table myTable = myTransactionalRepository.CreateTable("Warehouses");
...
}
See Also