Henry Olive
Members-
Content Count
284 -
Joined
-
Last visited
Everything posted by Henry Olive
-
Good Day Delphi 10.3 Is it possible to load a PNG directly into the Speed Button Glyph ? Thank You
-
Good Day, I have an App Exe File in an USB and I want to AutoRun the Exe File I created a autorun.inf file in the usb & wrote below codes [Autorun] Open=MyApp.exe Action=Start portable apps Icon=diskicon.ico but when i insert the usb, AutoRun.Inf file doesnt fire what am i doing wrong ? Thank You
-
Good Day, Delphi 10.3 procedure TForm2.Button1Click(Sender: TObject); var ST,ET : TDateTime; Diff : Double; begin ST := StrToDateTime (Edit1.Text); // Text = 08:00 ET := StrToDateTime (Edit2.Text); // Text = 11:30 Diff := HoursBetween(ST,ET); Edit3.Text := FloatToStr(Diff); The result of above proc is 3 i was expecting 3,5 Thank You end;
-
I'd like to thank whoever moved my question to this group. Thank You So Much Tom.
-
I just noticed that there is a Windows Api group, should i write this question to Windows Api ?
-
Thank You SO MUCH Mvanricnen, Lars, Pat
-
Thank you so much Z, Uwe, David David, Yes They can only choose from these 14 items I'm sure you you suggested me a short & clever way but what you mean by (EndIndex - StartIndex) / 2 ?
-
Thank You so much David User enters the StartTime & EndTime by hand ( by choosing from the combox Items) Each ComboBoxes has Items 17:30, 18:00 19:00 ... 24:00 Between 17:30 to 24:00
-
Here below my codes procedure TForm2.Button1Click(Sender: TObject); var ST,ET : TDateTime; Diff : Double; begin if (ComboBox1.Text='') or (ComboBox2.Text='') then Exit; ST := StrToDateTime (ComboBox1.Text); '17:30' ET := StrToDateTime (ComboBox2.Text); '24:00' Diff := MinutesBetween(ET,ST) / 60; Edit1.Text := FloatToStr(Diff); end;
-
Thank You Peter I edited my last post 6 minutes ago if you can check i tried also 24:00
-
Good Day, ST := Start Time ET := End Time What if ST:='17:30' and ET :='00:00' (The Difference should be 6,50 but i get 17,50) If i change '00:00' to '12:00' this time the Difference is 5,50 not 6:50 if i change '00:00' to '24:00' then this time 24:00 is not valid datetime error msg. Thank You
-
Thank you SO MUCH Peter, Uwe
-
Thank you so much Tom, Stano Stano, i know TDateTimePicker is good solution but i want to learn to get time difference between 2 strings
-
Good Day, I have an exisiting table (MyTable) , i'd like to create a new table exactly the same MyTable with different name Is there any command for this in Firebird 3 ? something like Create Table MyTable2 LIKE MyTable Thank You
-
Good Day, D-10,3 Edit1.Text := 10,36 MyVariable := 10,36758 I want to change MyVariable to exactly the same as Edit1.Text (10,36) I want to keep just 2 numbers after comma ( , ) Thank You
-
Thank you so much Lajos, David David, yes it is a Currency
-
Good Morning, DELETE FROM ORDETAIL OD JOIN ORDERS O ON O.ID = OD.ID WHERE OD.REMAINQTY = 0 and O.INVDOCNO IS NOT NULL What is the correct SQL code of my above wrong SQL code ? Thank You
-
Thank you SO MUCH Serge
-
Thank You Stano I change my question How to delete a detail table record according to both Master & Detail tables's some field values ? For example DELETE FROM ORDETAIL OD WHERE OD.REMAINQTY=0 Above code works but i also want to add into above code an additional condition from Master Table which is something like AND ORDERS.INVDOCNO IS NOT NULL One condition from Detail table second condition comes from Master Table If both conditions occur then i'll delete detail record.
-
Thank You Stano I dont have foreign key, First i want to delete detail record if the condition is met then i'll delete master record like below Delete From Orders O Where Not Exists (Select * from OrDetail OD Where O.ID=OD.ID )
-
Function with 2 return values ?
Henry Olive replied to Henry Olive's topic in RTL and Delphi Object Pascal
Thank You So Much Serge, Cristian, Uwe, David, Andrea, Frost.Brutal, Stefan, Leif, Bill, Gustav -
Good Day, Delphi 10.3 My Table looks like below ID ABC-0001 ABC-0002 ABC-0003 Is there a way to Locate a record just with last characters For Example SearchText := '0002' CDS1.Locate ('ID', QuotedStr(SearchText), [LoPartialKey]); Above Locate code doesnt works ! Thank You
-
Thank You Lajos
-
Good Day, I want to Update a target table according to a Master Detail table records. I wrote 2 Stored Procs. 1 for Update a Single record in target , the other for Update All records in target Here below my 2 s.procs, both works, but i'd like to be sure and need an expert confirmation Could someone please help.? /* For single 1 record update s.proc */ ALTER PROCEDURE UPDATEACC_SINGLE ( ACCCODE VARCHAR(20), ACTIVEYEAR VARCHAR(4) ) AS BEGIN IF (ACCCODE IS NULL) THEN EXIT; UPDATE ACCACCOUNT SET DEBIT= (SELECT SUM(AD.DEBIT) FROM ACCRECDETAIL AD JOIN ACCRECEIPT AR ON AD.RNO=AR.RNO WHERE AD.ACCCODE=:ACCCODE and EXTRACT(YEAR FROM AR.TDATE)=:ACTIVEYEAR), CREDIT= (SELECT SUM(AD.CREDIT) FROM ACCRECDETAIL AD JOIN ACCRECEIPT AR ON AD.RNO=AR.RNO WHERE AD.ACCCODE=:ACCCODE and EXTRACT(YEAR FROM AR.TDATE)=:ACTIVEYEAR); END /* For all records update s.proc */ ALTER PROCEDURE UPDATEACC_ALL ( ACTIVEYEAR VARCHAR(4) ) AS begin UPDATE ACCACCOUNT AC SET AC.DEBIT=(SELECT SUM(AD.DEBIT) FROM ACCRECDETAIL AD JOIN ACCRECEIPT AR ON AR.RNO=AD.RNO WHERE AR.RNO=AD.RNO and AD.ACCCODE=AC.ACCCODE and EXTRACT(YEAR FROM AR.TDATE)=:ACTIVEYEAR), AC.CREDIT=(SELECT SUM(AD.CREDIT) FROM ACCRECDETAIL AD JOIN ACCRECEIPT AR ON AR.RNO=AD.RNO WHERE AR.RNO=AD.RNO and AD.ACCCODE=AC.ACCCODE and EXTRACT(YEAR FROM AR.TDATE)=:ACTIVEYEAR); end Thank You