Henry Olive
Members-
Content Count
284 -
Joined
-
Last visited
Everything posted by Henry Olive
-
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
-
Thank you Vandrovnik your codes gives error (token unknown line 1 column 2 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.
-
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
-
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
-
Thank you Stano, Frickler, Serge Serge Thank you so much for your code.
-
Peter, Thank you so much for the information
-
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;
-
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
-
Thank you SO MUCH Serge
-
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
-
Thank you so much Ondrej, to use UNION ALL is a must in a CTE ? without using UNION ALL cant we use CTE ?
-
Is it possible to use a FMX component (Grid) in a VCL application ? Thank You
-
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
-
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)
-
Thankyou SO SO MUCH for your advices & codes
-
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
-
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) .....
-
Thank you so much Serge It works but it writes same price for every item !!
-
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
-
Showing a warning form to some users
Henry Olive replied to Henry Olive's topic in RTL and Delphi Object Pascal
Thank you so much David, Tom, Qubits, Lajos, Dany, Mvanrijnen -
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
-
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
-
Thank you so much Frickler, Serge, FrOst.Brutal
-
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