title: How to avoid getting this error "non-nullable column cannot be updated to null" when using ADO Master-Detail relation?
body: <p>I am trying to build Master-Detail Form using TADODataSet, TDBText for Master Table and TDBGrid for Details Table (something smiller to Orders Form like Master Table includs the order header and Details Table includes the Order Items)</p>
  
  <p>Master primary key is Identity column (autoincreament Field)</p>
  
  <p>When trying to add a new record in Master Table and then trying to add records in Details Table before posting the record in Master Table I get this error "non-nullable column cannot be updated to null" and this happens because the master table primary key value is still not known because I didn't post the master record but if I tried the same scenario except that before I add the details records I posted the Master record then the error doesn't appear.</p>
  
  <p>how to work around this problem?</p>
  
  <p>I am connecting Master Table with Details Table using the following properties :
  Both DataSets have courser location : Client</p>
  
  <p>Details Table : </p>
  
  <ul>
  <li>DataSource : Master Table DataSource</li>
  <li>Master Records : Id (Primary key of the master table)</li>
  <li>IndexFieldNames : OrderId (the field in Details Table that indicates to which master record does this detail record belong to)</li>
  <li>Lock Type : BatchOptimistic</li>
  </ul>
  
  <p>Please help me </p>
  
  <p>Thanks in advance
  Yazan Al-lahham</p>