Jump to content

Henry Olive

  • Content Count

  • Joined

  • Last visited

Community Reputation

5 Neutral

Recent Profile Visitors

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

  1. Henry Olive

    String Grid Loop

    Good Day, I have a StringList like below (total 4 rows) ITEMCODE...QTY 01-01.............10 (This Row is Empty) 01-02.............30 aaa I'd like to get JUST correct ITEMCODEs (According to my ITEMS table records) For example in above grid Empty Row and aaa dont available in ITEMS table so i want to skip them I only need '01-01' and '01-02' My Code is like below for i := 0 to SGrid1RowCount-1 do begin ItemNoCol:=SpinEditItemNo.Value; ItemNo:=SGrid1.Cells[ItemNoCol,i+2]; SQLDataset.Close; SQLDataset.CommandText :='SELECT ITEMCODE FROM ITEMS WHERE ITEMCODE='+QuotedStr(ItemNo); SQLDataset.Open; if (ItemNo='') or (SQLDataset.Fields[0].asString='') then ........ // I need a code here like Skip the row and go to next row else ...... ......... end; Thank You
  2. Henry Olive

    First Business Day Of Next Month ?

    Thank you so much Lars, Uwe You both are right, Is there a way to consider also local bank holidays ? Thank You
  3. How can i get First Business Day Of Next Month ? ( Saturday & Sunday are not Business days.) For example in February Next business day of next month is March-01 In May Next business day of next month is June-03 Thank You
  4. Henry Olive

    Character Problem

    The problem is SOLVED The Field's size in SQLDataset was 5 (should have been 8 ) I change the Field's size to 8 and problem solved I'm really very very sorry i firstly should have checked that size property I apologize to everyone THANK YOU
  5. Henry Olive

    Character Problem

    Good Day Delphi10, FB-3, SQLDataset, DataSetProvider, CDS, DataSource MasterTable TNAME Field.Value = 'A.Cap-' // There is - at the end When I insert a new record into the DetailTable my code is like below DetailTable.FieldByName('TNAME').asString := MasterTable.FieldByName('TNAME').asString; After Post & ApplyUpdate when i check releated record in the Database i see TNAME value in DetailTable is 'A.Cap' // No - at the end, There should have been 'A.Cap-' but in Database, MasterTable TNAME value = 'A.Cap-' // there is - at the end which is correct What is wrong ? Thank You
  6. Henry Olive

    Pos, SplitString

    Good Day, MyString could be 'Aaaa Bbbb <Axx Bxx>' or just '<Axx Bxx>' In any case i'd like delete just the part of <Axx Bxx> (Including < and >) What is the shortest way ? Thank You
  7. Henry Olive


    Good Day, I have 2 printers, before print any doc i may change my printer via PrintDialog with below codes i can print my docs w/o any problem but when i change the to my second printer ( not default) i get empty paper (no print) what am i doing wrong ? QrPreview1.QRPrinter.PrinterIndex:= Printer.PrinterIndex; QrPreview1.QRPrinter.Print; Thank You
  8. Henry Olive

    Round UpTo 1 Level up

    Thank you SO MUCH Uwe
  9. Good Day I want to round numbers 1 level UP, How can i do it ? If Value = 0,1 then Result= 1 If Value = 1,01 then Result= 2 If Value = 2,2 then Result= 3 If Value = 3,9 then Result= 4 If Value = 4,26 then Result= 5 etc Thank You
  10. Good Day, I need to find out if there is SUNDAY between 2 dates For example : StartDate = 06/23/2023 , EndDate = 06/26/2023 ( Result = 1 , Because 06/25/2023 = Sunday ) StartDate = 06/23/2023 , EndDate = 07/03/2023 ( Result = 2 , Because there are 2 Sundays ) StartDate = 06/23/2023 , EndDate = 06/24/2023 ( Result = 0 ) Thank You
  11. Good Day, How can i sort (descending) a table on a calculated field ? Thank You
  12. Henry Olive

    Debug Break Point

    Good Day, Delphi 10.3 When i compile or build my program i cant see in some code lines small BLUE POINT on the most left side of code screen so program doesnt read the lines with out blue point (I didnt change anything in Tools/Options.... etc.) . MyTable.Close; // There is blue point MyTable.Open; // No blue point Thank You
  13. Henry Olive


    Thank you SO much David, KodeZwerg, Programmer I solved the problem.
  14. Henry Olive


    Thank you so much Peter I dont convert anything My Code = a:= MyQuery.FieldByName('TOTAL').asFloat; (which is 66,3333.-) b:= MyQuery.FieldByName('RATIO').asFloat; (Which is 1,50 ); c:= a * b; // In Debug i see c as 99,50 instead of 99,4999 MyTable.Edit; MyTableBENF.asFloat := c; // i was expecting to see in mytable's BENF field 99,49 not 99,50 (BENF field in firebird3 database is as Numeric(15,2) (In Delphi my table's releated field's Currency proporties = True)
  15. Henry Olive


    Good Day, var a,b : Double a:= 66,3333 b:= 1,5 c:= a* b ( Delphi shows c:= 99,5, actually c should be 99,49995 ) How can i get exact result ( 99,49995 ) ? Thank You