Icon GetColumnsJSON Method

function GetColumnsJSON(Params: TParams; const DatabaseName:
      String=''): String

function GetColumnsJSON(Request: TEWBWebServerRequest; const
      DatabaseName: String=''): String

Usage

Use this method to retrieve the column definitions for the dataset as a JSON string.

When this method is called, the dataset adapter will:
  • Trigger the OnGetSelectParams event handler to get a list of parameters for the Select dataset command.

    Information This is actually not necessary for retrieving column definitions, but is called as part of the Select dataset command execution


  • Trigger the OnExecuteSelect event handler to execute the Select dataset command. The TDataSet descendant class instance that is used for building the column definitions is returned in this event handler.
There are two versions of this method: one for Elevate Web Builder server module applications and one for non-Elevate Web Builder server module applications such as ISAPI modules.
  • For Elevate Web Builder server module applications, the Request parameter indicates the incoming web server request and is used to retrieve any incoming parameters that should be used when executing the Select dataset command, and the DatabaseName parameter is a pass-through parameter that is passed to any event handlers in order to indicate that the operation is occurring for a specific database.


  • For non-Elevate Web Builder server module applications, the Params parameter indicates the incoming parameters that should be used when executing the Select dataset command, and the DatabaseName parameter is a pass-through parameter that is passed to any event handlers in order to indicate that the operation is occurring for a specific database.
Please see the Web Server Database Access API topic under the Using the Web Server section in the Elevate Web Builder manual for more information on the structure of the JSON used for dataset column definitions.

Information This method will be automatically called when the TEWBDatabaseAdapter HandleRequest method is called for automatic database access API request handling, so you normally will not need to call this method directly if you are using the HandleRequest method.
Image