Known issues with PowerBuilder .NET API

PowerBuilder .NET API has the following known issues:

  • Follow the following sample code to filter a datetime column in .NET DataStore:

    Filter($"startdate > {new DateTime(2012,01,01)}");

    Follow the following sample code to filter a decimal column in .NET DataStore:

    Filter("listprice > 9.5m");
  • ModelStore does not support string array parameters. Instead, you must use List<string> parameters. .NET DataStore supports string array parameters, however, you must use List<string>, instead of string[], to pass value to a string array parameter.

    For example:

    IList<string> array = new List<string> { "a", "b" };

    DataStore ds = new DataStore("d_employees ", _context);

    var count = ds.Retrieve(array);

  • Executing a for each loop a .NET DataStore will get the.NET DataStore destroyed.

  • With .NET DataStore/ModelStore, if the UpdateSQLStrategy is set to DeleteThenInsert, value cannot be updated for fields with the PropertySave(SaveStrategy.SaveOnUpdate) setting.

  • If a SqlModelMapper gets its data from columns that are named the same in two different tables, and no alias are assigned for the duplicate columns, the LoadByKey/LoadAll method incorrectly retrieves the same value for the columns.

  • If you assign value to a column in a ModelStore after retrieving data into the ModelStore using RetrieveByKey (for example, using the scripts below), calling SaveChanges cannot save the new value to the database. Instead, you shall call SetValue or set the row status first.

    ModelStore<Employee> ms = new

    ModelStore<Employee>(ChangeTrackingStrategy.PropertyState);

    ms.RetrieveByKey(_context, 1);

    ms[0].Name = "testname";

    var result = ms.SaveChanges(_context);

  • The Evaluate method may not work well in .NET DataStore.