[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sqldb' (#fcl)

TCustomSQLQuery.SetSchemaInfo

SetSchemaInfo prepares the dataset to retrieve schema info.

Declaration

Source position: sqldb.pp line 551

public procedure TCustomSQLQuery.SetSchemaInfo(

  ASchemaType: TSchemaType;

  ASchemaObjectName: string;

  ASchemaPattern: string

); virtual;

Arguments

ASchemaType

  

Schema type to use

ASchemaObjectName

  

Name of Object for which to return schema information.

ASchemaPattern

  

Pattern for schema information

Description

SetSchemaInfo will prepare the dataset to retrieve schema information from the connection, and represents the schema info as a dataset.

SetSchemaInfo is used internally to prepare a query to retrieve schema information from a connection. It will store the 3 passed parameters, which are then used in the ParseSQL and Prepare stages to optimize the allocated resources. setting the schema type to anything other than stNoSchema will also set (or mimic) the SQL statement as soon as the query is prepared. For connection types that support this, the SQL statement is then set to whatever statement the database connection supports to retrieve schema information.

This is used internally by TSQLConnection.GetTableNames and TSQLConnection.GetProcedureNames to get the necessary schema information from the database.

See also

TSQLConnection.GetTableNames

  

Get a list of the tables in the specified database

TSQLConnection.GetProcedureNames

  

Gets a list of Stored Procedures in the Database

RetrievingSchemaInformation

  

Retrieving Schema Information


Documentation generated on: Sep 28 2017