Language Reference Guide : System Classes : LongVcharObject Class : UpdateInDB Method
 
Share this page          
UpdateInDB Method
The UpdateInDB method replaces a long varchar data in the specified database table with the contents of the Value attribute of the LongVcharObject.
This method has the following syntax:
integer = LongVcharObject.UpdateInDB(query = querystring)
This method has the following parameter:
query
Specifies a query string, which is an SQL Update statement where the column to be updated is specified without a following equal sign and source variable (for example, Update LongText set text_col where chapter = 'Chapter 1')
Because the UpdateInDB method interacts directly with the database, it either initiates a transaction or becomes part of any ongoing transaction. The work that it does is not permanent until the transaction is committed. By default, you must issue a commit statement explicitly. For more information about transaction management, see the Programming Guide.
This method returns ER_OK if it is successful or another non-zero database error code if it is not. Descriptions of system constant values and their numeric equivalents are listed in Error Codes.
Do not call this method with autocommit turned on.