Jump to content

Lajos Juhász

  • Content Count

  • Joined

  • Last visited

  • Days Won


Lajos Juhász last won the day on May 21

Lajos Juhász had the most liked content!

Community Reputation

40 Excellent

1 Follower

About Lajos Juhász

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Lajos Juhász

    Floating point arithmetics

    My first guess is that you're comparing the result of a 32 bit and 64 bit applications. In 64 bit Extened = Double.
  2. Lajos Juhász

    converting string to date time

    var ldt: TDateTime; lFormat: TFormatSettings; begin lFormat:= TFormatSettings.Create; lformat.DateSeparator:='-'; lformat.ShortDateFormat:='yyyy-mm-dd'; ldt:=strtodatetime('2021-06-25 08:04:09', lFormat); ShowMessage(DateTimeToStr(ldt)); end;
  3. Lajos Juhász

    TJSONObject.Format bug

    A quick find in files returned that TJSon is implemented in the REST.Json.pas and it is not in your uses.
  4. You should learn to use the help. aStatusBar.SimpleText := 'selected cell -> ' + strngrd_Point3D.Row.ToString + '/' + strngrd_Point3D.Col.ToString;
  5. Lajos Juhász

    Disable & re-Enable a Procedure

    But you references the object as dm.Orders.Docno with dm that would suggest that it was from outside. In this case it should be: OrdersDOCNO.OnChange := nil; OrdersDOCNO.OnChange := OrdersDOCNOChange;
  6. Lajos Juhász

    Disable & re-Enable a Procedure

    OrdersDOCNOChange is part of the datamodul: dm.Orders.DOCNO.OnChange := dm.OrdersDOCNOChange;
  7. Lajos Juhász

    Alfabetical order of a letter

    ord('C')-ord('A')+1, ORD('E')-ORD('A')+1, ...
  8. Lajos Juhász

    SQL expression evaluation not supported

    Most probably the problem is the group by part. You've there O.Delvdate that is not in the select list. Interbase 2017 Update 1 (http://docwiki.embarcadero.com/InterBase/2020/en/Enhancements_to_GROUP_BY_and_ORDER_BY) introduced the extended syntax. If you're using a version that support you can write: SELECT O.DELVTYPE, SUM(OD.REMAINQTY) QTY, (Case O.DELVTYPE When 'Sea' then O.DELVDATE + 45 else O.DELVDATE + 15 end) as DELVDATE FROM ORDETAIL OD JOIN ORDERS O ON O.RNO=OD.RNO WHERE OD.ITEMNO = 'ABX22' GROUP BY O.DELVTYPE, 3 HAVING SUM(OD.REMAINQTY) > 0
  9. Lajos Juhász

    Delphi compatibility with Windows 11?

    I wonder how hard it will be to turn on UEFI on a laptop.
  10. Lajos Juhász

    What is the difference??

    The first one will create TMyForm instance with no owner. While the second one creates an instance of TMyForm owned by the application object. In case the form is the first form created by the application it will make it the mainform of the application. For more detail open VCL.Forms.
  11. There is no data type TxQuery it's TxQuery<T: TDataset>. Unfortunately in Delphi you cannot have a class reference to a generic class. I've even tried this: type TFDxQuery = TxQuery<TFDQuery>; TxFDQueryClass = class of TFDxQuery ; an it also fails with [dcc32 Error] Unit1.pas(43): E2021 Class type required I would expect that TFDxQuery is a class.
  12. Lajos Juhász

    Round up to next $5

    There is a bug in the code it will round up 5 to 10 so it should be: function RoundUpToFive (AValue : Double) : double; var lTrunc: integer; lMod5: integer; begin lTrunc:=Trunc(Avalue); lMod5:=lTrunc mod 5; if lMod5 = 0 then result:=lTrunc else result:=lTrunc + 5 - lMod5; end; Another interesting case would be how to round up 5.99 should it be $5 or $10?
  13. Lajos Juhász

    base64 encode/decode  TStringDynArray

    You can read a file as a string: TemplateLines := TFile.ReadAllText(afilepath,Tencoding.UTF8 );
  14. Lajos Juhász

    Image attachment in a html email??

    You can find information here: https://www.indyproject.org/2005/08/17/html-messages/
  15. Lajos Juhász

    10.4.2 IDE crashes on start

    I do hope that you're aware that the IDE is still a 32 bit application and can't use additional memory.