Jump to content

Henry Olive

Members
  • Content Count

    330
  • Joined

  • Last visited

Everything posted by Henry Olive

  1. Henry Olive

    Split String

    Thank you SO MUCH Serge
  2. Henry Olive

    Split String

    Thank You Sherlock, SwiftExpat Thank You SO MUCH Peter
  3. Henry Olive

    FB-3 SELECT WHERE

    Good Day, My Table : ID...TNAME..TDATE................INVNO 1......AA...........01/06/2022 2......BB............01/06/2022.........22 3......AA...........02/06/2022.........33 4......AA...........10/06/2022.........44 Requested Result : ID....TNAME.....TDATE..................INVNO 1........AA.............01/06/2022 4........AA............10/06/2022..........44 Lets say today = 13/06/2022 (dd/mm/yyy) and i want to show TNAME='AA' and INVNO IS NULL (Whatever TDATE is ) **or** INVNO IS NOT NULL but TDATE >= 03/06/2022 ( All 10 Days old records ) My Sql : SELECT * FROM MYTABLE WHERE TNAME IN ('AA') and (TDATE >= (SELECT MAX(TDATE) FROM MYTABLE ) - 10 or (X.INVRNO IS NULL)) with above Sql i dont see ID=4 record (Its INVNO is not null BUT Its Date is just 3 days old, that is i should see it ) Thank You
  4. Henry Olive

    FB-3 SELECT WHERE

    Thank you SO MUCH Stano, Serge, Pat
  5. Henry Olive

    FB-3 Get Connected Clients IP Numbers

    Good Day, FB-3,09 Super Server Delphi 10,3 TCP/IP FB FAQ says, If you wish to do it from SQL, you need to use Firebird 2.1 at least, and it's monitoring tables. The relevant table is MON$ATTACHMENTS which provides a lot of useful information like user name, IP address, connection state, remote process name (so you can see which application user is using), etc. then i tried below Sql but i cant see any IP Adress select MON$REMOTE_ADDRESS from MON$ATTACHMENTS Above query's result is like below ( No IP Number ) MON$REMOTE_ADDRESS --------------------------------------- fe80::2554:878:750b:852f%5/50222 fe80::9037:f453:60b:b6b9%5/52029 Thank You
  6. Henry Olive

    FB-3 Get Connected Clients IP Numbers

    Thank You SO MUCH Serge, for very useful informations
  7. Henry Olive

    Vcl to Fmx

    I wish everyone a healthy day I'm planning to start a Fmx database app. ( i already have a database Vcl app., i'll just convert it to Fmx) I saw there are 2 grids (Grid,String Grid) in Fmx, which one should i use instead of my vcl dbgrid ? Also is there any advice information anywhere in web regarding from Vcl to Fmx ? Thank You
  8. Henry Olive

    FB-3 Get Connected Clients IP Numbers

    Thank you so much Vandrovnik In server machine Ethernet Proporties both TCP/IPv4 and TCP/IPv6 CHECKED If i uncheck TCP/IPv6 ( Just TCP/IPv4 checked ) then i cannot connect My App (Rejected Remote Interface error)
  9. Henry Olive

    FB3 - FDBackUp

    Good Day, Is a backup operation with FDBackUp safe during all users use the program ? Also when i backup with FDBackUp, BackUp File's size same as actual database Is that normal ( No compress ) ? Thank You
  10. Henry Olive

    FB3 - FDBackUp

    Good Morning Serge, Thank you so much
  11. Henry Olive

    ExtractFileDir

    Good Day, My Program Folder = 'C:\MyApp\Data\MyData.FBD' // if it is LOCAL else it is \\Mysrv\c\MyApp My Exe File is in 'C:\MyApp' (Local) or \\Mysrv\c\MyApp I know how can i get ExeFolder which is C:\MyApp or \\Mysrv\c\MyApp but I Just need to get **MyApp** part of the folder w/o C:\ or \\Mysrv\c\ How can get it ? Thank You
  12. Henry Olive

    ExtractFileDir

    Thank you SO MUCH Uwe
  13. Henry Olive

    Time Between

    Good Day, procedure TDm.BackUpTimerTimer(Sender: TObject); var MyTime, BackUpStart,BackUpEnd : TTime; begin MyTime := Now; BackUpStart := dm.SettingBACKUPHOUR.AsDateTime; // which is 20:30 BackUpEnd := BackUpStart + EncodeTime(0,30,0,0); // which is 21:00 if ((MyTime >= BackUpStart) and (MyTime <= BackUpEnd)) then // this code doesnt work BackUp; end; Can somebody please help Thank You
  14. Henry Olive

    Time Between

    I changed MyTime to TTime and now my code works. Thank You SO MUCH Mark, Uwe
  15. Henry Olive

    Time Between

    Eventhough the time is between 20:30 21:00 below code doesnt work if ((MyTime >= BackUpStart) and (MyTime <= BackUpEnd)) then i check MyTime, BackUpStart, BackUpEnd all of them are correct when debugging if ((MyTime >= BackUpStart) then // this works but both with BackUpEnd doesnt work
  16. Henry Olive

    Time Between

    Thank You Mark, dm.SettingBACKUPHOUR = Varchar(5) and the value = '20:30'
  17. Henry Olive

    FB-3 Update Sql

    Good Morning, Orders Table ID*...DELIVERY_ID 1...........1 2...........5 OrderDetail Table ID*...LINENO*...UPRICE 1..........1...................50,00 1..........2...................60,00 2..........1...................80,00 Delivery Table ID*...ORDER_ID 1...........1 5...........2 Delivery_Detail Table ID*...LINENO*..UPRICE....ORDERDETAIL_LINENO 1..........1...............55,00...........1 ( I want to update this 55,00 price to 50,00 according to OrderDetail table) 1..........2...............40,00...........2 ( I want to update this 40,00 price to 60,00 according to OrderDetail table) 5..........1...............80,00...........1 UPDATE DELIVERY_DETAIL DD SET DD.UPRICE=(SELECT UPRICE FROM ORDERDETAIL OD WHERE OD.LINENO=DD.ORDERDETAIL_LINENO) WHERE EXISTS (SELECT 1 FROM ORDERDETAIL OD WHERE OD.LINENO=DD.LINENO) Above sql works but updates all UPrices in all deliverydetail table I want to Update Delivery_Detail table records just in ID=1 Thank You
  18. Henry Olive

    FB-3 Update Sql

    Good Morning Uwe Thank you so much
  19. Good Day, My S.Proc result like below ID...LINENO..DOCNO....ITEMCODE....QTY...COST........SELL.....UNITPROFIT...TOTALPROFIT...UPERCENTAGE 1..............1...........100............AA....................1..... 10,00......12,00..................2,00.....................2,00........... 20,00 1..............2...........100............BB..................10..... 10,00......15,00..................5,00...................50,00........... 50,00 I calculated UnitPercentage above, What is the general approach to get an Invoice's Total Profit Percentage ? Like (All Items Total Sell - All Items Total Cost) * 100 / All Items Total Cost ? Thank You
  20. Henry Olive

    FB-3,09 Case & Cast

    Good Day, Case When (X.A= X1.A) then CAST((10.00000 / 0.3048) * 14.7776 as NUMERIC (18,2)) I'm getting Numeric Value is out of range error msg. What is wrong ? Thank You
  21. Henry Olive

    FB-3,09 Case & Cast

    Thank you SO MUCH Serge 10.00000 was just a sample, the value could be 2000.05586 or 36500.153596 i dont know but the value will have 5 decimal because the field is NUMERIC(18,5) in database
  22. 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
  23. Henry Olive

    FB-3,09 Case & Cast

    Thank you Vandrovnik your codes gives error (token unknown line 1 column 2 cast )
  24. 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.
  25. 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
×