

Henry Olive
Members-
Content Count
325 -
Joined
-
Last visited
Everything posted by Henry Olive
-
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
-
I wish everyone a healthy and a happy new year After I moved my program from Delphi-XE to Delphi-10.3 I put a break point in a code line and the line's color changes to light purple which is OK. When i run (F9) the application break point color change to Green and doesnt debug In Delphi Project/Options/Building/Delphi Compiler section TARGET = Debug Configuration - Windows 64 bit platform Could someone please help ? Thank You
-
Good Morning David, Thank you so much I found the problem, the application is old and comes from Delphi-7 => Delphi XE => Delphi 10.3 There was no any folder calls DEBUG for Dcus I created a folder (DEBUG) transfered all Dcu's there and now everthing is OK. Thank You
-
Thank you so much Serge Yes, i used the method as you said.
-
Dany, I solved the issue Thank you so much
-
I wish everyone a healthy and a happy new year. In Interbase I used to use below codes for InActive & Active ALL triggers But i get error msg. in FB-3.08 The Message = UPDATE operation is not allowed for system table RDB$TRIGGERS How can i set InActive and Active ALL Triggers in FB-3.08 ? Thank You //Active All Triggers SQLText:='UPDATE RDB$TRIGGERS set RDB$TRIGGER_INACTIVE = 0 '+ // 0=ACTIVE, 1=INACTIVE 'WHERE RDB$TRIGGER_NAME IN( SELECT A.RDB$TRIGGER_NAME '+ 'FROM RDB$TRIGGERS A '+ 'LEFT JOIN RDB$CHECK_CONSTRAINTS B ON B.RDB$TRIGGER_NAME = A.RDB$TRIGGER_NAME '+ 'WHERE ((A.RDB$SYSTEM_FLAG = 0) or (A.RDB$SYSTEM_FLAG is null)) and '+ 'A.rdb$trigger_source not starting with ''CHECK'' and '+ '(B.rdb$trigger_name is null) and (NOT(A.RDB$TRIGGER_NAME LIKE ''RDB$%'')))'; // InActive All Triggers SQLText:='UPDATE RDB$TRIGGERS SET RDB$TRIGGER_INACTIVE = 1 '+ // 0=ACTIVE, 1=INACTIVE 'WHERE RDB$TRIGGER_NAME IN( SELECT A.RDB$TRIGGER_NAME '+ 'FROM RDB$TRIGGERS A '+ 'LEFT JOIN RDB$CHECK_CONSTRAINTS B ON B.RDB$TRIGGER_NAME = A.RDB$TRIGGER_NAME '+ 'WHERE ((A.RDB$SYSTEM_FLAG = 0) or (A.RDB$SYSTEM_FLAG is null)) and '+ 'A.rdb$trigger_source not starting with ''CHECK'' and '+ '(B.rdb$trigger_name is null) and (NOT(A.RDB$TRIGGER_NAME LIKE ''RDB$%'')))'; P.s : I was running above SQL commands in Delphi and in RunTime
-
Thank you SO SO SO MUCH RVK I created the procedures w/o any problem
-
Thank you so much Dany You say you put them in the application folder, you mean i need to copy fbclient.dll, msvcr100.dll and msvcp100.dll. ( Total 3 files) into the Server Machine My Application Folder ? No need to copy any file into clients machine ? or you mean I need to copy fbclient.dll into client machine's SYSTEM32 Folder and I need also to copy msvcr100.dll and msvcp100.dll. into Server's my application folder ?
-
Thank you SO SO MUCH RVK Sorry i'm new in Firebird. I really appriciate the time you spend for me. Here below my Procedure i get Token Unknown EXECUTE error msg. What am i doing wrong ? SET TERM ^ ; CREATE PROCEDURE TRIGGERSINACTIVE EXECUTE BLOCK AS DECLARE VARIABLE NOMTABLE varchar(100); DECLARE VARIABLE REQ1 Varchar(100); BEGIN for select x.RDB$TRIGGER_NAME from rdb$triggers x where rdb$trigger_source is not null and (coalesce(rdb$system_flag,0) = 0) and rdb$trigger_source not starting with 'CHECK' into :NOMTABLE do begin NOMTABLE=trim(NOMTABLE); req1= 'ALTER TRIGGER ' || :NOMTABLE || ' INACTIVE;'; execute statement req1; end END^ SET TERM ; ^
-
Thank you SO MUCH RVK I Removed all SET TERM and ^ in last END This time i get Token Unknown Line 1 Column 279 ?. Interesting your code works perfectly in Flame Robin but doesnt work in Delphi Run Time Line 1 Column 279 = :NOMTABLE