InsertIntoDB Method
The InsertIntoDB method writes the string object into the specified database table and constructs its DBHandle.
This method has the following syntax:
integer = StringObject.InsertIntoDB([tablename = varchar(256)])
This method has the following parameter:
tablename
Identifies the table in which to store the string object's text. This table must have the proper structure (for information about this table, see the Programming Guide). If you do not specify a table name, OpenROAD uses the default system table, II_STORED_STRINGS.
After this method completes, OpenROAD stores the constructed DBHandle for the object in the DBHandle attribute. Generally, you store this value in a database table also (a different table than that holding the actual text of the object). For instructions to store string objects in a database, see the Programming Guide.
When you use the InsertIntoDB method, you are interacting directly with the database. Consequently, the work that the method does is part of any ongoing transaction or, if no transaction is open, the method initiates a transaction. The work that the method performs is not permanent until a commit statement is executed. Be sure to commit the changes made by this method.
For more information about committing changes, see the discussion of transaction management in the Programming Guide.
This method returns ER_OK, if successful, and other non-zero database error codes 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.