• Create_Query

    • Syntax: _Create_Query(Base_Query, Json_Variables)

    • Purpose: Replaces variables in a SQL query with values from a JSON object.

  • DB_Data

    • Syntax: _DB_Data(Simple_Json_Variables)

    • Purpose: Encrypts parameters in a JSON object for secure transmission to a SQL Server.

    • Note: Use DB_Data64 for international characters, binary content, or to avoid issues with accents.

  • DB_Data64

    • Syntax: _DB_Data64(Simple_Json_Variables)

    • Purpose: Encrypts parameters in a JSON object using Base64 encoding, for secure transmission to a SQL Server (ideal for international and binary content).

  • DB_Execute_Sql

    • Syntax: _DB_Execute_Sql(http_Url, Query_to_Execute, Parameters_Included_in_Query, varToReceiveResult, Procedure_to_run_with_result, Procedure_to_run_in_case_of_error)

    • Purpose: Executes a SQL query on a remote web server (specified by http_Url).

  • DB_REC_FIELDS_NAME

    • Syntax: _DB_REC_FIELDS_NAME(var_array_with_results, nField)

    • Purpose: Returns the name of a field (column) in a query result set.

  • DB_REC_FIELDS_TYPE

    • Syntax: _DB_REC_FIELDS_TYPE(var_array_with_results, nField)

    • Purpose: Returns the data type of a field (column) in a query result set.

  • DB_REC_FIELDS_PROVIDERTYPE

    • Syntax: _DB_REC_FIELDS_PROVIDERTYPE(var_array_with_results, nField)

    • Purpose: Returns the provider-specific data type of a field in a query result set.

  • DB_REC_FIELDS_SIZE

    • Syntax: _DB_REC_FIELDS_SIZE(var_array_with_results, nField)

    • Purpose: Returns the maximum size (in characters or bytes) of a field in a query result set.

  • DB_REC_FIELDS_NUMERICPRECISION

    • Syntax: _DB_REC_FIELDS_NUMERICPRECISION(var_array_with_results, nField)

    • Purpose: Returns the numeric precision of a numeric field in a query result set.

  • DB_REC_FIELDS_NUMERICSCALE

    • Syntax: _DB_REC_FIELDS_NUMERICSCALE(var_array_with_results, nField)

    • Purpose: Returns the number of digits to the right of the decimal point for a numeric field in a query result set.

  • DB_REC_FieldCount

    • Syntax: _DB_REC_FieldCount(var_array_with_results)

    • Purpose: Returns the number of fields (columns) in a query result set.

  • DB_REC_RecordCount

    • Syntax: _DB_REC_RecordCount(var_array_with_results)

    • Purpose: Returns the number of records (rows) in a query result set.

  • DB_Retrieve_Light_Sql

    • Syntax: _DB_Retrieve_Light_Sql(http_Url, Query_to_Retrieve, Parameters_Included_in_Query, varToReceiveResult, Procedure_to_run_with_result, Procedure_to_run_in_case_of_error)

    • Purpose: Retrieves data from a SQL database on a remote server.

  • DB_Retrieve_Simple_Sql

    • Syntax: _DB_Retrieve_Simple_Sql(http_Url, Query_to_Retrieve, Parameters_Included_in_Query, varToReceiveResult, Procedure_to_run_with_result, Procedure_to_run_in_case_of_error)

    • Purpose: Retrieves data from a SQL database on a remote server, providing simplified result handling.

  • DB_Retrieve_Sql

    • Syntax: _DB_Retrieve_Sql(http_Url, Query_to_Retrieve, Parameters_Included_in_Query, varToReceiveResult, Procedure_to_run_with_result, Procedure_to_run_in_case_of_error)

    • Purpose: Retrieves data from a SQL database on a remote server, providing detailed result handling.

  • Get_Sql

    • Syntax: _Get_Sql(QueryNumber, QueryResult)

    • Purpose: Stores SQL query results in an array for easy access.

  • Get_Sql_Rows_Cols

    • Syntax: _Get_Sql_Rows_Cols(QueryNumber, QueryResult)

    • Purpose: Gets the number of rows and columns from an HTML query result. You must specify the query number.

  • Local_DB_Close

    • Syntax: _Local_DB_Close(DB_Handler)

    • Purpose: Closes a local SQLite database.

    • Parameters:

      • DB_Handler: (string) Required. The database handler obtained from Local_DB_Open_Create_Database.

  • Local_DB_Create_Table

    • Syntax: _Local_DB_Create_Table(DB_Handler, TableName, Column_Names_CSV)

    • Purpose: Creates a new table in a local SQLite database.

    • Parameters:

      • DB_Handler: (string) Required. The database handler obtained from Local_DB_Open_Create_Database.

      • TableName: (string) The name of the table to create.

      • Column_Names_CSV: (string) Comma-separated list of column names.

    • Notes:

      • A primary key column named 'id' is automatically created.

      • No data types are required.

  • Local_DB_Drop_Table

    • Syntax: _Local_DB_Drop_Table(DB_Handler, TableName)

    • Purpose: Deletes a table from a local SQLite database.

    • Parameters:

      • DB_Handler: (string) Required. The database handler obtained from Local_DB_Open_Create_Database.

      • TableName: (string) The name of the table to delete.

  • Local_DB_Error_Code

    • Syntax: _Local_DB_Error_Code(DB_Handler)

    • Purpose: Returns the numeric error code for the most recent failed SQLite operation.

    • Parameters:

      • DB_Handler: (string) Required. The database handler obtained from Local_DB_Open_Create_Database.

  • Local_DB_Error_Message

    • Syntax: _Local_DB_Error_Message(DB_Handler)

    • Purpose: Returns the error message for the most recent failed SQLite operation.

    • Parameters:

      • DB_Handler: (string) Required. The database handler obtained from Local_DB_Open_Create_Database.

  • Local_DB_Execute_Sql

    • Syntax: _Local_DB_Execute_Sql(DB_Handler, Query)

    • Purpose: Executes an SQL query on a local SQLite database (for creating tables, inserting, updating, or deleting data).

    • Parameters:

      • DB_Handler: (string) Required. The database handler obtained from Local_DB_Open_Create_Database.

      • Query: (string) The SQL query to execute.

  • Local_DB_Open_Create_Database

    • Syntax: _Local_DB_Open_Create_Database(DB_FileName)

    • Purpose: Opens an existing local SQLite database or creates a new one. Returns a database handler.

    • Parameters:

      • DB_FileName: (string, optional) The name of the database file. If omitted, the database is stored in memory only.

    • Notes:

      • Database is created in the device's Documents folder.

  • Local_DB_Retrieve_Sql

    • Syntax: _Local_DB_Retrieve_Sql(DB_Handler, Query)

    • Purpose: Executes an SQL SELECT query on a local SQLite database and returns the results.

    • Parameters:

      • DB_Handler: (string) Required. The database handler obtained from Local_DB_Open_Create_Database.

      • Query: (string) The SQL SELECT query to execute.