ODBPPLib.IODBPP.SetTableSchema changes the schema of a table.
void SetTableSchema (
   uint tableId,
   TableSchema schema,
   object fieldMapping


tableIdthe table Id defining the table's handle.
schemapointer to a valid schema or null to rebuild table as is.
fieldMappingAn array of int values allowing this method to map field from there old schema to the new - eg. fieldMapping[0] = 2, will move the value in the first field of the old table into the third field of the new table. Sub fields are appended to the end so that <fields><sub fields 1><sub fields 2> and so no.

Image of Field Number Order

Return Values

SearchTokenIndex returns the total amount of object found in the search.


  • If fieldMapping parameter is missing, than SetTableSchema will map the first fixed field to the first fixed field, the second fixed field to the second and so on, plus the first variable field to the first variable field and so on.
  • SetTableSchema is not part of the transaction.
  • When schema equals NULL SetTableSchema attempts a rebuild and/or upgrade for the table file to its current standard and this will also open the table.
Example Use
  • C#
public static uint FIRST_TABLE = 1;
private void button1_Click(object sender, EventArgs e){
      ODBPPLib.ODBPP odbpp = new ODBPPLib.ODBPP();
      odbpp.BeginTransaction(odbpp.SHARED, 60000);
      ODBPPLib.TableSchema schema = odbpp.GetTableSchema(FIRST_TABLE);
      if(schema.indexes.Count > 0){
   catch (Exception e1)

Also See

Listen All
Comments (0)
Characters left: 2500
Ekky Software Homepage T-Accounts Online ObjectDatabase++ TScript Ekky Software Homepage T-Accounts Onlinee ObjectDatabase++ TScript