Programming Guide : Working with Images and Text Strings : How You Can Work with Text Strings : How You Can Display a String from a Database
 
Share this page          
How You Can Display a String from a Database
To display a string stored in a database, use the DBHandle attribute of the StringObject object that is associated with the entry field. Set the value of the DBHandle attribute to the value of the DBHandle for the particular string.
To check whether the DBHandle was set successfully, use the ErrorStatus attribute. The ErrorStatus attribute is set to ER_OK if the DBHandle setting is successful or to a nonzero value if an error occurs.
Each time you set the DBHandle attribute, OpenROAD actually loads a copy of the string into the StringObject object associated with the field. If the user edits the text in the entry field, these changes are made to the text string in the StringObject object. To update the corresponding string in the database, use the UpdateInDB method. This method is described in How You Can Update Strings in a Database.