Jump to content

Henry Olive

Members
  • Content Count

    284
  • Joined

  • Last visited

Everything posted by Henry Olive

  1. Henry Olive

    Delphi 10.3 Debug

    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
  2. Henry Olive

    Delphi 10.3 Debug

    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
  3. Henry Olive

    Firebird 3 Client Installation

    Thank you so much Serge Yes, i used the method as you said.
  4. Henry Olive

    Firebird 3 Client Installation

    Dany, I solved the issue Thank you so much
  5. 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
  6. Henry Olive

    Firebird3- Active and InActive ALL Triggers

    Thank you SO SO SO MUCH RVK I created the procedures w/o any problem
  7. Henry Olive

    Firebird 3 Client Installation

    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 ?
  8. Henry Olive

    Firebird3- Active and InActive ALL Triggers

    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 ; ^
  9. Henry Olive

    Firebird3- Active and InActive ALL Triggers

    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
  10. Henry Olive

    Firebird3- Active and InActive ALL Triggers

    Thank you so much RVK I tested your code in FlameRobin it works w/o any problem But when i try the same code in Delphi i get "Token Unknown Line1 Column 5 TERM." err.msg. What am i doing wrong ? Here below my codes SQLText := 'SET TERM ^ ; '+ '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 || '' ACTIVE;''; '+ 'execute statement req1; '+ 'end '+ 'END^ '+ 'SET TERM ; ^' ; SQLDataset1.Close; SQLDataset1.CommandText :=SQLText; SQLDataset1.ExecSql;
  11. Henry Olive

    SplitString

    I wish everyone a healthy day. Uses System.StrUtils; var S, FirstStr, SecStr : String, begin S := SqlQuery1.FieldByName ('RANGE').asString; // it is '5/10' FirstStr := SplitString(S, '/')[0]; SecStr := SplitString(S, '/')[1]; end; Above code works in Delphi-XE w/o any problem but i get Not enough actual parameters err.msg in Delphi 10.3 What is wrong ? Thank You
  12. Henry Olive

    SplitString

    Thank you so much Alexander, Peter, Achim, Dany I tested my code in 10.3 in a *new project* and noticed my code works, then I copied the new project's Uses ( Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Controls, Forms, Vcl.Dialogs, Vcl.StdCtrls, System.StrUtils; ) I returned to my main project and paste the uses here and delete old uses and my problem solved. Regarding the variable semicolon, in my original codes it is semicolon, comma is my wrong typo I'm very very sorry for misleading you.
  13. Henry Olive

    Trim

    I wish everyone a healthy day Edit1.Text := 'AA BB' MyVar := Trim(Edit1.Text); // MyVar is still AA BB, i was expecting to get AABB Thank You
  14. Henry Olive

    Trim

    Thank you Gunther, Peter
  15. Henry Olive

    Firebird3 - WHERE MYFIELD IN : MYVALUE

    I wish everyone a healthy day I have a S.Proc and it's WHERE part like below ..... WHERE MY FIELD IN : MYVALUE I'm getting Token Unknown err. msg Line 12 Char 20 which is : ( myvalue='AA', 'BB' ) what am i doing wrong ? Thank You
  16. Henry Olive

    Firebird3 - WHERE MYFIELD IN : MYVALUE

    Thank you SO MUCH Dany, Serge, Irawan
  17. Henry Olive

    Pos

    I wish everyone a healthy day. S:= Edit1.Text; // which is A1 A2 A3 A4 with below code i get only A1 but i need to get A1 A2 (First 2 words ) X:=Pos(' ',S); Left2Words:= Copy(S,1,X-1); Edit2.Text := Left2Words; Thank You
  18. Henry Olive

    Pos

    Thank you so much Peter, Sviridenkov, Elagin
  19. Henry Olive

    PopUpMenu TPoint

    I wish everyone a healthy day. I want to Filter a Dataset When user click the DBGrid's *desired title (Column)* i want to show a PopUpMenu according to its place in the dbgrid's column I write below code procedure TForm1.DBGrid1TitleClick(Column: TColumn); var p:TPoint; begin if Column.FieldName ='TNAME' then p:=DBGrid1.ClientToScreen(Point(0,DBGrid1.Height)); Pop1.Popup(p.x, p.y) end; With above code PopUpMenu PopUp sometimes Above, sometimes below of the dbgrid I need the PopUpMenu PopUp according to its place in the dbgrid's column Something like below p:=DBGrid1.Columns[1].ClientToScreen(Point(0,DBGrid1.Columns[1].Height)); Thank You
  20. Henry Olive

    PopUpMenu TPoint

    Thank you so much Peter
  21. Henry Olive

    FB3.0 SQL

    I wish everyone a healthy day. ITEMS Table ITEMNO AAA ITEMMOVEMENTS View ( WHNO = Ware House No, and i dont know how many ) ITEMNO...WHNO...INCOME...OUTGO AAA.............1................10.................0 AAA.............2................20.................0 AAA.............3................30.................0 AAA.............3..................0...............10 How can get below result ? ITEMNO...TOTAL_STOCK.....1.......2.......3 AAA...............50......................10.....20.....20 Thank You
  22. Henry Olive

    FB3.0 SQL

    Thank you so much Attila, Serge, Vandrovnik, Stano Serge, your solution is very interesting, not exactly like Pivot but it is very very simple and fast, i'll keep your codes for future Stano, Your five methods... is also very very useful Thank you so so much
  23. Henry Olive

    IB -> FB Data Transfer

    Your method
  24. Henry Olive

    Firebird 4.0 UDF

    I wish everyone a healthy day. In my data path there are udf.sql, udflib.c, udflib.def files I copied below code from Firebird's udf.sql when i try to execute below code in Flame Robin I'm getting CREATE FUNCTION SUBSTR failed unknown ISC error 336068876 DECLARE EXTERNAL FUNCTION substr CSTRING(256), SMALLINT, SMALLINT RETURNS CSTRING(80) FREE_IT ENTRY_POINT 'fn_substr' MODULE_NAME 'udflib' What is wrong ? Thank You
  25. Henry Olive

    Firebird 4.0 Unknown sql type err.

    I wish everyone a healthy day Regarding below SQL I'm getting Unknown sql type err.msg. What is wrong ? SELECT ID, (UPRICE * QTY) AS PRICE /* Cause of the problem is multiplication */ FROM TABLE1 Thank You
×