Recent content by andre42

  1. A

    Get Time from DateTime

    It seems that this thread was resurrected, but since nobody mentioned the MTIME function yet I thought I might just do that. MTIME function MTIME ( [datetime-expression] ) Returns an INTEGER value representing the time in milliseconds
  2. A

    Answered Query performance

    I thought what Cringer wrote is a static query? As far as I understood a dynamic query is when you use a query object, build a query string and use the query-open method on the query object. Usually (ie. if there is no compelling reason to use a static or dynamic query) I use simple for each...
  3. A

    Answered Query performance

    If there is an index on ORDER.ordtyp (or preferably on ORDER.ordcomplete and ORDER.ordtyp) then option 1 should be faster. Usually I introduce a variable to put the return-value of ENTRY, but I don't know how much of a difference that makes, ie. if ENTRY is evaluated more than one time per...
  4. A

    Extremly slow using Progress and SQL-Database

    @Patrice Perrot You are complete right. If the where condition is resolved through an index than ? is greater than all other values. I am aware of that feature but forgot about it since I don't need to use it often.
  5. A

    Extremly slow using Progress and SQL-Database

    Add another "or = ?" it the field is not mandatory.
  6. A

    Question print in chinese in text file

    It looks like there is more than one issue with your code. For your example to make sense, session:cpstream would have to be a Unicode capable code page and match the code page your program is stored. (This attributes tells Progress in which code page your programs are stored. Since you are...
  7. A

    Question Tutorial for simple crud application

    The compile error means that you don't have the database connected while compiling.
  8. A

    utility to reformat bad indentation

    Two years ago I tried a few options (probably because I stumbled over some very badly formatted programs, usually I don't encounter anything remotely as bad). I tried Piew, Notepad++ with 3GP plugin and Progress Developer Studio. In my experience PDS was best, then 3GP and then Piew (closest to...
  9. A

    DO FOR updOrder-line TRANSACTION

    I don't think it makes much sense to do a code review of this snippet. If I had to I would start with the fact that this should be done in a single transaction, not two separate transactions.
  10. A

    Progress Collation

    So in this example you actually have "ń" (small letter n with acute)? ISO8859-1 does only contain "ñ" (small letter n with tilde). If you actually have to support all kinds of international letters than you have no other option than to convert your database and application to UTF-8. If you think...
  11. A

    Question Question about window app

    Are you able to active the debug alert? Since you already get the message from the leave trigger you can look at the stack trace and hopefully see where it was triggered from.
  12. A

    Speedup For Each Code

    Great post as always, Tom. If you look more closely both lines AND corpdata.ArrearsRpt.recOffc = t-officer.t-ofcCode AND NOT can-do("IN251870,IL063128,IA065464,IL070155",corpdata.ArrearsRpt.recOffc) refer to corpdata.ArrearsRpt.recOffc. kasundha should check t-officer.t-ofcCode against the list...
  13. A

    Question Making a code smaller

    There are several ways around this, assuming you don't want to actually refactor. For example you could put the code inside the procedure in a .if Include and just use the include in the procedure.
  14. A

    Is Index important for record update?

    Most important points have been made (searching the records is faster with a matching index, changing records is slower the more indexes include the fields you are changing). One important point is to change both fields in one go within the same assign statement. If you are just doing...
  15. A

    Question Logging Error 2624 and STOP Condition

    I agree with RealHeavyDude. This is what KMoody suggested in their question anyway, and what you had to do before structured error handling. It is nice that Progress finally introduces -catchStop (I thought that they only did that with OE 12). Some things about STOP errors are still broken IMO...
Top