Jump to content

Henry Olive

Members
  • Content Count

    284
  • Joined

  • Last visited

Everything posted by Henry Olive

  1. Henry Olive

    FB-3,09 Case & Cast

    You are right, i didnt notice that i forgot to copy Select, i'm so sorry, Please accept my apology Your new code works Thank You SO MUCH
  2. Henry Olive

    FB-3,09 Case & Cast

    Thank you Vandrovnik your codes gives error (token unknown line 1 column 2 cast )
  3. Henry Olive

    FB-3,09 Case & Cast

    Thank you Vandrovnik select cast((10.00000 / 0.3048) * 14.7776 as NUMERIC (18,2)) from rdb$database also works in FlameRobin in my side but in my real sql ( also In FlameRobin ) i'm getting Numeric Value is out of range error msg.
  4. Henry Olive

    ScrollBox ScrollBar Mouse Tracking

    Good Day, I have a form, respectively panel, scrollbox, another panel and some components on the last panel ScrollBox's VertScrollBar properties as below Range = 800 Visible = True Tracking = True The scrollbar in the scrollbox works w/o any problem, if i mouse click (up & down) but when i try mouse tracking, scrollbar doesnt move ( doesnt move up or down) I want to control the scrollbar with a mouse. What is the problem Thank You
  5. Henry Olive

    FB-3 SQL ROWS

    Good Day, My Table like below CUSTNO...TDATE...................AA........BB 1..................20/01/2022.......1,50.....1,65 1..................26/02/2022.......1,55.....1,60 2..................15/02/2022.......1,50.....1,55 I'd like to get Max TDATE datas of a desired CUSTNO That is, if my parameter for CustNo = 1 then the result should be like below CUSTNO...TDATE...................AA........BB 1..................26/02/2022.......1,55.....1,60 if my parameter for CustNo = 2 then the result should be like below CUSTNO...TDATE...................AA........BB 2..................15/02/2022.......1,50.....1,55 I wrote below SQL and i get correct result but i'd like to be sure it is the only one solution or there is a better way SELECT TDATE, AA, BB FROM MYTABLE WHERE CUSTNO=:CUSTNO ORDER BY TDATE DESC ROWS 1 Thank You
  6. Henry Olive

    FB-3 SQL ROWS

    Thank you Stano, Frickler, Serge Serge Thank you so much for your code.
  7. Henry Olive

    ScrollBox ScrollBar Mouse Tracking

    Peter, Thank you so much for the information
  8. Henry Olive

    ScrollBox ScrollBar Mouse Tracking

    Thank You so much Peter, Edwin Edwin, exactly yes I wrote below code ( Delphi 10.3) and everything is OK mouse wheel works but to me, there should not need below code, mouse wheel should work without any code. procedure TMeetNote2.ScrollBox1MouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); var aPos: SmallInt; begin aPos:= ScrollBox1.VertScrollBar.Position - WheelDelta div 10; aPos:= Max(aPos, 0); aPos:= Min(aPos, ScrollBox1.VertScrollBar.Range); ScrollBox1.VertScrollBar.Position := aPos; Handled := True; end;
  9. Henry Olive

    FB-3,09 Count(*)

    I wish everyone a healthy day. SELECT COUNT(*), DOCNO, DOCTYPE Returns 1...ABC10....XXX 1...ABC11....YYY I want to get TOTAL record count of the query result that is the result like below (Total 2 records returns) 2...ABC10....XXX 2...ABC11....YYY How can i get total record count of a query result ? Thank You
  10. Henry Olive

    FB-3,09 Count(*)

    Thank you SO MUCH Serge
  11. Henry Olive

    FB-3,09 Recursive CTE

    I wish everyone a healthy day I'm testing to use Recursive CTE instead of my Recursive S.Proc. WITH RECURSIVE CTE AS (SELECT B.ITEMCODE, B.SUBITEMCODE, IT.ITEMTYPE, B.QTY, V.CUSTNO, V.PRICE, IT.STOCK FROM BOM B JOIN ITEMS IT ON IT.ITEMCODE=B.SUBITEMCODE JOIN VENDOR V ON V.ITEMCODE=B.SUBITEMCODE ) SELECT ITEMCODE, SUBITEMCODE, ITEMTYPE, QTY, CUSTNO, PRICE, STOCK FROM CTE WHERE ITEMCODE='ABC' Above Query works but it doesnt explode the BOM, just shows BOM table's datas. Thank You
  12. Henry Olive

    FB-3,09 Recursive CTE

    Thank you so much Ondrej, to use UNION ALL is a must in a CTE ? without using UNION ALL cant we use CTE ?
  13. Is it possible to use a FMX component (Grid) in a VCL application ? Thank You
  14. I wish everyone a healthy day. In object inspector's IndexDefs i created an index ('ITCDINX') for the CDS then i set IndexName to ITCDINX and I wrote Fields = (ITEMCODE;SUBITEMCODE) and Grouping Level=1 then in Fields Editor i selected the field 'ITEMCODE' in field's OnGetText Event i wrote below code procedure TForm1.CDS1ITEMCODEGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin if gbFirst in CDS1.GetGroupState (1) then Text := Sender.AsString else Text := ''; end; I dont get any error msg., my query works well but *all* ITEMCODE's values in DBGrid is empty (No value) all the other values are OK. What am i doing wrong ? Thank You
  15. Henry Olive

    FB3 - Update SQL

    I wish everyone a healthy day In below sql, i get multiple rows in singleton select error msg what is wrong ? Thank You UPDATE ITEMS IT SET IT.BOMCOST = (SELECT V.FPRICE FROM VENDOR V WHERE V.ITEMNO = IT.ITEMNO and V.PREFERRED ='Yes') WHERE EXISTS (SELECT 1 FROM VENDOR V WHERE V.ITEMNO=IT.ITEMNO)
  16. Henry Olive

    FB3 - Update SQL

    Thankyou SO SO MUCH for your advices & codes
  17. Henry Olive

    FB3 - Update SQL

    Thank you Lajos, Even though there more than 1 record for the same ItemNo (More than 1 Supplier (which is CustNo) for the same ItemNo) there must be only 1 supplier (CustNo) with *Preferred = Yes* Vendor Table for ItemNo AAA ItemNo ...CustNo.... Preferred AAA.................1...............Yes AAA.................2 AAA.................3
  18. Henry Olive

    FB3 - Update SQL

    Thank you Serge VENDOR : ITEMNO VARCHAR(20) NOT NULL, CUSTNO INTEGER NOT NULL, PREFERRED VARCHAR(3) PK=ITEMNO, CUSTNO ..... ITEMS : ITEMNO VARCHAR(20) PK, BOMCOST NUMERIC(15,5) .....
  19. Henry Olive

    FB3 - Update SQL

    Thank you so much Serge It works but it writes same price for every item !!
  20. I wish everyone a healthy day. When a part has arrived into our ware house I want to notify some users that the part has arrived I created a form which has all necessary fields regarding the arrived part (It gets the datas from Dispatch table's after post event) I need something like below Dispatch Table After Post Event If dm.DispatchDocType.asString <> 'IN' then Exit; If MatchText(dm.DispatchDocType.asString,['Normal', 'Rework']) then begin Users.First; While not Users.Eof do begin If UsersDepartment.asString = 'Planning' then Form1.Show // to releated user ??? Users.Next; end; end; Could someone please help ? Thank You
  21. Henry Olive

    Showing a warning form to some users

    Thank you so much David, Tom, Qubits, Lajos, Dany, Mvanrijnen
  22. Henry Olive

    MAPISendMail Win10 64 Bit

    I wish everyone a healthy day. After i re-build an old 32 bit Delphi App on Delphi 64 Bit (10.3) I cant send mail with or w/o attachment, ( w/o any error message, just do nothing ) Isn't MAPISendMail supported interface on Win10 and Outlook 64 bit ? Thank You
  23. Henry Olive

    FB3 Get Connected Users List

    I wish everyone a healthy & happy new year I used to get Connected Users List in Interbase like below SELECT DISTINCT TM.TMP$USER_HOST COMPUTERNAME, U.LONGNAME,U.ADMINRIGHT, U.DEPARTMENT, U.IP_ADRESS,U.USERNAME,U.ADMINRIGHT, Case When E.TELLIST <> ''No'' then E.EXTENSION else '''' end as EXTENSION FROM TMP$ATTACHMENTS TM JOIN URIGHT U ON U.COMPUTERNAME=TM.TMP$USER_HOST JOIN EMPLOYEE E ON E.EMPNO=U.EMPNO WHERE TMP$USER_HOST IS NOT NULL I tried below code in FB3,08 but it is not what i'm looking for SELECT RDB$USER FROM RDB$USER_PRIVILEGES group by 1 Could some please convert above IB SQL to FB SQL Thank You
  24. Henry Olive

    FB3 Get Connected Users List

    Thank you so much Frickler, Serge, FrOst.Brutal
  25. Henry Olive

    Firebird 3 Client Installation

    I wish you everyone a healthy and happy new year I installed FB3 Server into the server machine and my own terminal pc, both works well. For other clients pc's what should i do ? (In interbase i used to copy/paste gds32.dll into Windows\WOW64 directory) In Firebird, there is fbclient.dll i got a copy from my own pc (which i installed FB server before) and copied this file user terminal's C:\WINDOWS\SYSTEM32 folder but the user cant access the server so i copied the fbclient.dll into C:\WINDOWS\SYSWOW64 but still the user cant access the server I think there should more files to copy to terminal pc's What are the all files for client pc ? and which folder should i copy them ? Thank you
×