Field value required in TClientDataSet

Mathias

Member
Hello folks!

I am building a new component like TSimpleDataSet in Delphi 7 but this time with TOracleDataSet. If I select from the DB and some of the columns are required they end up required in my TClientDataSet descendent as well. As the internal TDataSetProvider takes care of assigning values to the required fields I want to be able to post the record to the TClientDataSet without having assigned a value for all required columns. I have set the Required property to False within the TClientDataSet but when I try to post the Insert I get a very specific error message
confused.gif
: "Field value required." from TClientDataSet.InternalPost. I checked at run time through the Watch list that all fields are optional but still TClientDataSet got a different information from the internal TOracleDataSet. Any ideas what other setting could get propagated into the TClientDataSet avoiding it to post a new record?

Thanks for a short answer in advance.

Salut,
Mathias

[This message has been edited by Mathias (edited 17 December 2002).]
 
I found a combination where it would work. The reason is that the internal TDataSetProvider uses the field list of the internal TOracleDataSet to identify mandatory columns. I had to set those columns to not required too and not only the fields of my TClientDataSet descendent.

Salut,
Mathias

[This message has been edited by Mathias (edited 18 December 2002).]

[This message has been edited by Mathias (edited 18 December 2002).]
 
Back
Top