ReadField

ODBPPLib.IDatabaseObject.ReadField reads data fields from the DatabaseObject obtained by ReadObject or DeleteObject.
object ReadField(
   string name
);
object ReadFixed(
   uint field
);
object ReadSubField(
   string subTable,
   uint row,
   string name
);
object ReadSubTable(
   uint subTable,
   uint row,
   uint field
);
object ReadVariable(
   uint field
);

Parameters

namethe name of the desired field to access.
fieldthe index number of the desired field to access, starting from zero (0).
rowthe index number or name of the desired sub-table row to access, starting from zero (0).
subTablethe index number of the desired sub-table field to access.

Return Values

ReadField returns the object (variant) with the current field value.

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);
      object[] key = new object[2];
      key[0] = "127";
      key[1] = 0;
      if(odbpp.DeleteObject(FIRST_TABLE,
                   odbpp.GREATER_EQUALTO, 6, key) != null)
      {
         result = odbpp.GetObject();
         if(result.readField("First") == 123)
                   odbpp.CommitTransaction(true);
      }
   }
   catch (Exception e1)
   {
      MessageBox.Show(e1.Message);
   }
}

Also See

AddObject, DeleteObject, NewObject, ReadObject, RewriteObject, RestoreObject, WriteField
Listen All
Comments (0)
Characters left: 2500
 

Contact Ekky

Thanks for your interest.

Ekky Software Customer Support Team.

Ekky Software Product Range
Ekky Software Homepage T-Accounts Online ObjectDatabase++ TScript Ekky Software Homepage T-Accounts Onlinee ObjectDatabase++ TScript