

Henry Olive
Members-
Content Count
325 -
Joined
-
Last visited
Everything posted by Henry Olive
-
Thank You SO MUCH Serge, for very useful informations
-
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
-
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)
-
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
-
Good Morning Serge, Thank you so much
-
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
-
Thank you SO MUCH Uwe
-
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
-
I changed MyTime to TTime and now my code works. Thank You SO MUCH Mark, Uwe
-
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
-
Thank You Mark, dm.SettingBACKUPHOUR = Varchar(5) and the value = '20:30'
-
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
-
Good Morning Uwe Thank you so much
-
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
-
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
-
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
-
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
-
Thank you Vandrovnik your codes gives error (token unknown line 1 column 2 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.
-
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
-
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
-
Thank you Stano, Frickler, Serge Serge Thank you so much for your code.
-
Peter, Thank you so much for the information
-
Thank You so much Peter, Edwin Edwin, exactly yes I wrote below code ( Delphi 10.3) and everything is OK mouse wheel works but to me, there should not need below code, mouse wheel should work without any code. procedure TMeetNote2.ScrollBox1MouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); var aPos: SmallInt; begin aPos:= ScrollBox1.VertScrollBar.Position - WheelDelta div 10; aPos:= Max(aPos, 0); aPos:= Min(aPos, ScrollBox1.VertScrollBar.Range); ScrollBox1.VertScrollBar.Position := aPos; Handled := True; end;
-
I wish everyone a healthy day. SELECT COUNT(*), DOCNO, DOCTYPE Returns 1...ABC10....XXX 1...ABC11....YYY I want to get TOTAL record count of the query result that is the result like below (Total 2 records returns) 2...ABC10....XXX 2...ABC11....YYY How can i get total record count of a query result ? Thank You