Home DADE

Problem with AvailableCriteriaList index

edited February 2003 in DADE
RB6, D5 Pro.

I have an application that just failed on me after the vendor added a var
binary (8) field to a table.

It turns out that "AvailableCriteriaList" scans through the fields,
returning a list where the entries are constrained by
if not (lField.DataType in dacaBLOBS) then
... return the field

While "SelectCriteria" uses an index into a list created by GetFields and
GetFieldsFromDataSet - which doesn't limit fields by blob type.

So, with the original tables, all was well - the index returned for a
particular field name in AvailableCriteria list matched the index in the
SelectCriteria list. As soon as the binary field was added, the index was
off by one starting with that field...

I managed to brow-beat the vendor into eliminating the field
(changed to different data type), but (as much as a bully as I am) there
will come the day that I cannot influence a vendor to do this.

Should AvailableCriteriaList return the same index in all cases as is
required for SelectCriteria? Or should I look for an alternative
approach>


Cheers,
EdB

Comments

  • edited February 2003

    Have you tested this against RB 7 for D5? If not try downloading a trial
    version and performing a test.

    From looking at the RB 7 source code, I do not see an issue. The
    SelectCriteria method indexes into the AvailableCriteria list.

    RB 7 includes.....

    - support for Delphi 5, Delphi 6 and Delphi 7.
    - years worth of fixes and enhancements (i.e. since RB 6.x)
    - new features
    - on going maintenance releases, patches, enhancements

    http://www.digital-metaphors.com/rbuilder/order.html

    Please contact sales@digital-metaphors.com if you have questions about
    updating.



    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2003
    Well, good news about RB7...

    I actually already own a copy of D7E and RB7 - I'm just a little nervous
    about updating this old D5Pro and RB6 box - there is a LOT of code
    dependent on some pretty weird low-level manipulation of the RB code...
    As well, the D5 box is an old Win95 workstation that has had *way*
    too much installed and uninstalled over the years... It gets even
    grumpier about change than *I* do!

    It's all a matter of finding the time to Ghost this box and try the
    update out...

    Thanks,
    EdB

    In article <3e5ba0eb$1@dm500.>, "Nard Moseley \(Digital Metaphors\)"
  • edited February 2003

    Okay, great - for now just modify the RB 6 source code for that method.

    You should be able to install D7 and RB 7 on the same box as the D5, RB 6
    machine. There is no conflict there.


    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.