RewriteObject

ODBPPLib.IODBPP.RewriteObject is used in conjunction with ReadObject to change the values of the object.
DatabaseObject RewriteObject (
   uint tableId
);

Parameters

tableId The table Id defining the table's handle.

Return Values

RewriteObject returns the DatabaseObject with the newly re-written object's values.

Remarks

Example Use
public static uint FIRST_TABLE = 1;
private void button1_Click(object sender, EventArgs e)
   try{
      ODBPPLib.ODBPP odbpp = new ODBPPLib.ODBPP();
      odbpp.OpenDatabase("C:\\My\\Database\\Control\\File.odc");
      odbpp.BeginTransaction(odbpp.SHARED, 60000);
      odbpp.OpenTable(FIRST_TABLE);
      uint objectId = 1;
      result = odbpp.ReadObject(FIRST_TABLE, odbpp.GREATER_EQUALTO, 0, objectId);
      if(result != null && result.readField("First") != 123)
      {
         result.WriteField("First",123);
         result.RewriteObject(FIRST_TABLE);
         odbpp.CommitTransaction();
      }
   }
   catch (Exception e1)
   {
      MessageBox.Show(e1.Message);
   }
}

Also See

AddObject, DeleteObject, NewObject, ReadObject, RestoreObject
 

Contact Ekky Software

All around the world Ekky Software is contactable seven days of the week by submitting the following details.

Thank you for your time and interest.
Ekky Software Customer Support Team.

Ekky Software Product Range
Ekky Software Homepage Texas Business Software ObjectDatabase++ TScript Ekky Software Homepage Texas Business Software ObjectDatabase++ TScript