Click or drag to resize

TransactionalRepository Constructor (String)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Opens or creates a transactional database on disk in read-write mode.

Namespace:  Telogis.GeoBase.Transactional
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public TransactionalRepository(
	string path
)

Parameters

path
Type: SystemString
The path to the file to open. Typically the filename will end with the 'gbtx' extension.
Remarks
When you have finished with a transactional repository you should call the dispose method to release memory and release the file handle.
Examples
This code snippet demonstrates how you can check to see if the repository was created, or simply loaded from disk. If the repository was created it will be empty. This is typically a good place in the execution cycle of your application to create any tables and indexes that your application needs to function.
C#
String fname = "MyData.gbtx";

bool created = !System.IO.File.Exists(fname);
TransactionalRepository tr = new TransactionalRepository(fname);

if (created) {
    // we should add all the tables and 
    // indexes we need to the repository
} else {
    // the repository already exists and
    // we simply opened it. we probably
    // don't need to do anything.
}

...

// finished with the repository:
tr.Dispose();
See Also