Jump to content

Henry Olive

Members
  • Content Count

    327
  • Joined

  • Last visited

Everything posted by Henry Olive

  1. Henry Olive

    FB-3 SELECT WHERE

    Thank you SO MUCH Stano, Serge, Pat
  2. 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
  3. Henry Olive

    FB-3 Get Connected Clients IP Numbers

    Thank You SO MUCH Serge, for very useful informations
  4. 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
  5. 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)
  6. 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
  7. Henry Olive

    FB3 - FDBackUp

    Good Morning Serge, Thank you so much
  8. 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
  9. Henry Olive

    ExtractFileDir

    Thank you SO MUCH Uwe
  10. 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
  11. Henry Olive

    Time Between

    I changed MyTime to TTime and now my code works. Thank You SO MUCH Mark, Uwe
  12. 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
  13. Henry Olive

    Time Between

    Thank You Mark, dm.SettingBACKUPHOUR = Varchar(5) and the value = '20:30'
  14. 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
  15. Henry Olive

    FB-3 Update Sql

    Good Morning Uwe Thank you so much
  16. 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
  17. 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
  18. 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
  19. 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
  20. Henry Olive

    FB-3,09 Case & Cast

    Thank you Vandrovnik your codes gives error (token unknown line 1 column 2 cast )
  21. 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.
  22. 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
  23. Henry Olive

    FB-3 SQL ROWS

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

    FB-3 SQL ROWS

    Thank you Stano, Frickler, Serge Serge Thank you so much for your code.
  25. Henry Olive

    ScrollBox ScrollBar Mouse Tracking

    Peter, Thank you so much for the information
×