unidatauniobjects

UniFile ReadNamedFields


I'm currently using IBM's UniObjects and I trying to retrieve multiple fields from a UniFile at once to increase efficiency.

UniFile uFile = uSession.CreateUniFile("fileName");
uFile.RecordID = inputID;
string[] fieldNames = {"I_Field_1", "D_Field_1", "I_Field_2", "D_Field_2"};
UniDynArray uFields = uFile.ReadNamedFields(fieldNames);

uFields value:

þvalue1þþvalue2

þ = delimiter for the UniDynArray

The problem is that half of these fields are I-descriptors and half are D-descriptors. The I-descriptors will not output unless only a single one of them is in the array fieldNames like so:

string[] fieldNames = {"I_Field_1"};
UniDynArray uFields = uFile.ReadNamedFields(fieldNames);

So I guess my question is why are the I-descriptor fields not being displayed and if there is a way they can be using this or a similar method.

I'm new to stackoverflow as well as an entry-level developer so thank you for any help you can provide.


Solution

  • It sounds like an defect with UniObject's. Since you say it is IBM's UniObject's, you most likely have an old version (UniData/UniVerse is owned by Rocket Software now).

    Assuming you are on an old version, it is possible this works in a newer version. You should look into scheduling an update of your UniData server and hence client software such as UniObjects.

    Outside of this, you can probably raise a bug with your VAR/Support Provider or Rocket Software directly.