No announcement yet.

OptTech Sort Fix

  • Filter
  • Time
  • Show
Clear All
new posts

    OptTech Sort Fix

    There was a major fix to OptTech sort.
    One of the things was when using a control statement like this:
    SORT (#10,C,A)

    OTSW32.DLL here is:
    09/17/2021 03:41 PM 212,992 bytes.

    I had the older version, but continued to use it until I got stung today.
    There is a download button "Authorized Downloads" on main page at the bottom.

    Wow, my version is from 04/25/2005 without ever seeing a problem... of course I never had the need to sort by delimited fields. I only do positional record sorts. Thanks Mike.


      Double quotes cause incorrect result using DEL(9) option.
      There will be no fix from author so please control input if using this combination of options.
      Full example intentionally not posted and retcode will not report an error.

      Example of a TAB delimited file with an embedded $DQ in a field.
      Error found sorting using OptTech with SQLitening (column #4 product) and (column #9 price) from a created recordset using demo sample.db3.
      The abbrevation for inches is " (or a $DQ.)
      PRINT #1, "32"" monitor" + $TAB + "320.99"
      PRINT #1, "24"" monitor" + $TAB + "240.99"

      sort(#2,N,A) DEL(9)

      Fixed length files do not use column numbers so do not have this problem.
      Tested with OptTech dll of the following sizes and field #2 will not correctly sort. Outrec will not outrec field #2.
      83.456 bytes
      188,416 bytes
      212,992 bytes

      These records contain a $DQ which will cause the problem using OptTech:
      select rowid,price,product from parts where product like '%"'

      Last edited by Mike Doty; 27 Feb 2023, 08:36 PM.