tSQLConnection - The Database Update Framework

See Also: Declaring Variables, Struct 

Purpose

tSQLConnection is a structured type used by some members of the cDbUpdateFunctionLibrary class, but mainly by the cSQLConnectionHandler and cSQLConnectionIniFile classes.

 

Type Declaration

Struct tSQLConnection

    Boolean bEnabled                // 1. There can only be one active/enabled connection at a time.

    String sConnectionID            // 2. The name of the connection ID.      

    Integer iDbType                 // 3. Database type; "MS-SQL Server", "DB2", "Oracle", "MySQL", "PostgreSQL"

    String sDriverID                // 4. Name of the driver. E.g. MSSQLDRV_ID, DB2_DRV_ID, ODBC_DRV_ID,

                                                               //        ORAFLEX, SQLFLEX, MDSPgSQL or MDSMySQL.

    String sServer                  // 5. SQL Server/DSN/ODBC source name

    String sDatabase                // 6. SQL Database

    String sConnectionString        // 7. Full connection string as is needed by e.g. the login command.

    Boolean bTrusted                // 8. Trusted connection (then is UID & PWD not used)                

    String sUserID                  // 9. User ID

    String sPassword                // 10. Password

    String sSchema                  // 11. DB2 (and perhaps ODBC specific)

    String sBaseTableSpace          // 12. DB2 specific

    String sLongTableSpace          // 13. DB2 specific

    String sIndexTableSpace         // 14. DB2 specific

    Boolean bSilentLogin            // 15. True=Silent login. (i.e. don't show Database login

                                    //     dialog if program login to fails). Same as driver "Options" parameter.

    Boolean bError                  // 16. Is set to true on any error when reading values to the struct.

End_Struct            


 

Syntax

Use cDbUpdateFunctionLibrary.pkg

:

tSQLConnection {variableName}

 

Declaring variables

To declare tSQLIniFileConnection variables, use the name of the type (tSQLIniFileConnection) followed by the variable name.

tSQLIniFileConnection SQLConnection

See struct variables for more details of instantiating struct types.


Example