AddObject

ODBPPLib.IODBPP.AddObject adds the object currently handled by a table, using NewObject if there is not currently an object.
ODBPPLib.DatabaseObject AddObject (
   unsigned int tableId,
   long Id64
);

Parameters

tableID The table Id defining the table's handle.
Id64 The ID required for the new object, 0 for the next available

Return Value

AddObject returns the DatabaseObject with the newly added object's values.

Remarks

Example Use
  • C#
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);
      ODBPPLib.DatabaseObject obj = odbpp.NewObject(FIRST_TABLE);
      obj.WriteField("First", 456);
      obj.WriteField("Second", 456.789);
      odbpp.AddObject(FIRST_TABLE,0);
      odbpp.CommitTransaction(true);
      odbpp.EndTransaction();
   }
   catch (Exception e1){
      MessageBox.Show(e1.Message);
   }
}

Also See

NewObject, DeleteObject, ReadObject, RewriteObject, 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