User Tools

Site Tools


samples:samples:sqlwizard

Table of Contents

SQLWizard sample

Documentation | Samples | SQLWizard

Summary

How to provide SQL Layer support.

Description

What the sample shows:

  • Launching an interactive SQL layer wizard dialog
  • Specifying database connection parameters and type
  • Selecting spatial tables from the database
  • Choosing geometry and attribute columns
  • Configuring spatial reference systems
  • Setting up layer filtering and field mapping
  • Creating new SQL layer (.ttkls) definitions interactively
  • Testing database connections before saving
  • Applying the newly created layer to the viewer
  • Managing multiple SQL layers in the project
  • Saving layer definitions for future reuse
  • Browsing available databases and tables
  • Handling various SQL database backends

This sample illustrates use of:

Name Description
TGIS_TokenizerTokenizer for splitting strings into delimited tokens.
TGIS_Tokenizer.ExecuteExTokenizes a simple delimited string such as
TGIS_Tokenizer.ExecuteTokenizes a string using the specified delimiters.
TGIS_LayerVectorSqlAbstract.SQLParametersExList of additional connection parameters.
TGIS_Layer.GetAvailableLayersGets a list of layers available in storage.
TGIS_Config.SaveSaves the configuration content to the underlying storage.
TGIS_Config.WriteStringWrites a string value to the active section.
TGIS_Config.SectionOverrides the current section used for config read and write operations.
TGIS_ConfigFactory.CreateConfigCreates a config instance based on the path extension.

Code

This sample is available on the following platforms (click to view the source code on GitHub):

2026/09/21 00:22

Page Tools