borland Packages Class Hierarchy sql.dataset Package Index
java.lang.Object +----borland.jbcl.dataset.Resolver +----borland.sql.dataset.SQLResolver +----borland.sql.dataset.QueryResolver
Constructors Properties Methods Event Listeners
Implements Serializable
The QueryResolver component is the default Resolver object of the Database component. It encapsulates UpdateMode behavior and uses SQL queries to resolve data changes to a server.
The database property of this component must be set to the Database component that this ProcedureResolver is associated with. Otherwise, a DataSetException is generated.
To make a query updatable:
When troubleshooting resolution problems, columns other than those with edited values may be causing problems. For instance, the problem might stem from columns which are included in the WHERE clause of the update query.
If you get a message that no rows were affected by the update query, check whether someone meanwhile modified the original row. This would cause the WHERE clause to fail. Use the DatSet.refetchRow() method to get the original row from the server to determine if this is the case.
JBuilder automatically recognizes read-only data such as calculated columns, and attempts to discover other non-updatable columns. Some JDBC drivers seem unaware that such columns are read-only. The JDBC-ODBC bridge seems particularly affected by this. For this reason, you should set column properties to not resolvable. While this seems redundant, this can prove crucial to your application.
Columns of certain data types and fields which are calculated on the server could cause the comparison in the WHERE clause of the update query to fail. Conditions which might cause this include:
Possible solutions to the above types of problems are:
If your server returns an error other than a constraint or integrity violation, check whether your driver supports prefixing field names with tables names, for example, testtable.column1. If not, set the useTableName property of the Database component to false.
In 1-1 relationships, the QueryResolver is able to resolve SQL queries that have more than one table reference. Metadata discovery detects which table each column belongs to and the default resolution order is set in the resolveOrder of the StorageDataSet. When using 1-Many relationships, use a separate master detail DataSet. For Many-1 relationships, use lookups.
public QueryResolver()Default constructor of a QueryResolver object.
public Database getDatabase() public void setDatabase(borland.sql.dataset.Database database)The DataBase object associated with the QueryResolver. If not set, a DataSetException is generated.
public int getUpdateMode() public void setUpdateMode(int updateMode)The method by which the updated rows in the local DataSet are identified with the corresponding rows of the server table. Valid values for this property are defined in the UpdateMode class.
public synchronized void close(borland.jbcl.dataset.StorageDataSet dataSet)Frees any system resources such as Databases, statements, and so on that are associated with the specified StorageDataSet.
Overrides: borland.jbcl.dataset.Resolver.close(borland.jbcl.dataset.StorageDataSet)
public void closeStatements(borland.jbcl.dataset.StorageDataSet dataSet)Frees any system resources used for statements associated with the specified StorageDataSet.
Overrides: borland.sql.dataset.SQLResolver.closeStatements(borland.jbcl.dataset.StorageDataSet)
public void deleteRow(borland.jbcl.dataset.DataSet dataSet)Deletes the current row in the DataSet from the Database.
Overrides: borland.sql.dataset.SQLResolver.deleteRow(borland.jbcl.dataset.DataSet)
public void insertRow(borland.jbcl.dataset.DataSet dataSet)Inserts the current row of the DataSet into the Database specified in this resolver's database property.
Overrides: borland.sql.dataset.SQLResolver.insertRow(borland.jbcl.dataset.DataSet)
public void updateRow(borland.jbcl.dataset.DataSet dataSet, borland.jbcl.dataset.ReadWriteRow oldDataRow)Updates the current row of the specified DataSet in the Database.
public synchronized void addResolverListener(borland.jbcl.dataset.ResolverListener listener) public synchronized void removeResolverListener(borland.jbcl.dataset.ResolverListener listener)