Reading DBParm values from an external text file

As an alternative to setting the DBParm property in a PocketBuilder application script, you can use the PowerScript ProfileString function to read DBParm values from a specified section of an external text file, such as an application-specific initialization file.

StepsTo read DBParm values from an external text file:

  1. Open the application script in which you want to specify connection parameters.

  2. Use the following PowerScript syntax to specify the ProfileString function with the SQLCA.DBParm property:

    SQLCA.dbParm = ProfileString ( file, section, key, 
         default )
    

    For example, the following statement in a PocketBuilder script reads the DBParm values from the [Database] section of the APP.INI file:

    SQLCA.dbParm=ProfileString("APP.INI","Database",
       "dbParm","")
    
  3. Compile the script to save your changes.