Using the Depts table as test case with the following structure:
Code: Select all
create table depts( oid number(8) not null, name varchar2(200), dept_desc varchar2(200), notes varchar2(200) );
alter table depts add constraint dept_pk primary key (oid);
alter table depts add constraint dept_ck check (oid < 100);
Building a simple WinForm with DataTable(CachedUpdates = false), DataLink, and four Textedits bonded to the Depts fields, and follow next steps:
1. Run the WinForm, open DataTable. Textedits will show the current record.
2. Edit Name, and Dept_Desc with new values.
3. Edit OID with value > 100, and execute DataLink.EndEdit() method, an exception is raised because of dept_ck constraint.
4. Re-edit OID with value < 100 and re-execute DataLink.EndEdit() method, no exception is raised, but the value of the Name, and Dept_Desc is reverted to the original values !!!!!!!!!, so I losses the edits done before the Exception is raised !!!!!!!!!!!!
How can I solve such an issue.
OraConnect: 9.1.131
Dev Lang: C#
Dev IDE: Visual Studio 2012
Database: Oracle 12c