OracleDataSet is read only

helmis

Member²
Hi

how can i use a OracleNavigator with OracleDataSet because add & insert and delete Button are not enabled.

OracleDataSet can be used in insert & update mode through a tdatasource ?

thanks
 
Did you include the rowid in the SQL text? To quote the User's Guide:
Making a dataset updateable
To be able to update records, a dataset needs to know the 'rowid' of every retrieved record. A rowid is an internal Oracle structure that uniquely identifies a record in the database. As long as you do not include it in the query, the CanModify property of the dataset remains False. To make an updateable dept dataset, the SQL property would be:

select dept.*, dept.rowid from dept

Furthermore, you should not use column aliases for the updateable table in the select statement of an updateable dataset. These alias names would be used in subsequent insert or updates to the updating table, and would therefore lead to an error.

If for some reason it is not possible to supply a rowid in the query, you can use the OnApplyRecord event to make the dataset updateable.
 
Back
Top