Jump to content

Henry Olive

Members
  • Content Count

    302
  • 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

    VCL DB App. To Cloud

    Good Day Delphi : 10.4 Is there any program that converts a Vcl Db Appl. to Cloud ? If not which solution is best in Delphi (RadServer etc...) Thank You
  2. Henry Olive

    Excel Get Column Number

    Thank you so much DelphiUdit, DieHollander
  3. Henry Olive

    Excel Get Column Number

    Good Day I'm trying to Import Datas from Excel into a table When i scan the excel sheet i need to know in which column i am var Sheet, Book : Variant; begin Book:= ExcelApp.WorkBooks.Open(OD1.FileName); Sheet := Book.Worksheets[1]; for Col:= Low to High do begin if Sheet.Cell.Column = 2 then // (i need to get column number here), ERROR Method Cell not supported doThis; end; end;
  4. Henry Olive

    Delete First & Last Character

    Thank you so much Jon, Remy
  5. Good Day Str := 'Abc' or could be Abc First, I want check if first char = ' then i want to delete it Second I want check if Last char = ' then i also want to delete it that is, if Str='Abc' then the result should be Abc if Str = Abc then i dont need to do anything Thank You
  6. Henry Olive

    Get, Set FileAtrributes

    This time i get below error msg FileName :='C:\TEST PROG -> This is FOLDER not FILE attributes:= TFile.GetAttributes(FileName); // Error Msg = The specified file was not found Could be there is still any hidden unicode character ? ( My Form FileFormat shows ANSI ) Thank You
  7. Henry Olive

    Get, Set FileAtrributes

    Thank You SO MUCH Lajos
  8. Good Day I want to make a FOLDER Hidden then turn to Normal but i get an error (error point below) What am i doing wrong ? Thank You procedure TFolderss.btnHiddenClick(Sender: TObject); var FileName : String; attributes: TFileAttributes; begin FileName := FoldersFOLDERPATH.AsString; attributes:= TFile.GetAttributes(FileName); Include(attributes,TFileAttribute.faHidden); Here i get [dcc64 Error] UFolders.pas(103): E2003 Undeclared identifier: 'attributes ' TFile.SetAttributes(FileName, attributes); end; procedure TFolderss.btnNormalClick(Sender: TObject); var FileName : String; attributes: TFileAttributes; begin FileName := FoldersFOLDERPATH.AsString; attributes:= TFile.GetAttributes(FileName); Exclude(attributes,TFileAttribute.faNormal); TFile.SetAttributes(FileName, attributes); end;;
  9. Good Day I want to make a **Folder** ReadOnly or Hidden and then change to Normal I tried below codes for ReadOnly and Normal but i got below err.msg var attributes: TFileAttributes; attributes := TFile.GetAttributes(CDS1FOLDERPATH.AsString); ReadOnly : Include(attributes, faReadOnly); // ERROR E2010 Incompatible types: 'TFileAttribute' and 'TFieldAttribute' TFile.SetAttributes(CDS1FOLDERPATH.AsString, attributes); Normal : Exclude(attributes, faReadOnly); TFile.SetAttributes(CDS1FOLDERPATH.AsString, attributes); Hidden :
  10. Henry Olive

    Ord Funcition

    Thank you so much Kas, Uwe My problem solved.
  11. Henry Olive

    Ord Funcition

    Thank you so much Uwe, your code works but the result is not as my expectation //Edit1.Text = A Edit2.Text := IntToStr(Ord(Edit1.Text[1])); Result = 65, Expecting 1 //Edit1.Text = B Edit2.Text := IntToStr(Ord(Edit1.Text[1])); Result = 66, Expecting 2
  12. Henry Olive

    Ord Funcition

    Good Day I'm trying to get a char's alphabetic order number for example A=1, C=3... etc. Edit2.Text := IntToStr(Ord(Edit1.Text)); with above code I'm getting 37331868 for A (expecting 1) what am i doing wrong ? Thank You
  13. Henry Olive

    FloatToStr

    Thank You Vandrovnik
  14. Henry Olive

    FloatToStr

    Good Day Delphi 10.4 When i convert to a Float to Str i'm having comma, dot problem like below ItemNo := Table1ITEMNO.asString; Qty := Table1QTY.asString; (Original Value is Float) SQLText := 'SELECT * FROM MyProcedure (ItemNo, Qty)'; I copy sql to clipboard & clipboardt shows Qty value as 11,25 (According to my Windows setting) but Firebird Database requires Qty value as 11.25 ( with a dot, not a comma ) How can i convert 11,25 to 11.20 ? Thank You
  15. Good Day, Delphi 10.4 I created a grouping on ITEMNO and it's OnGetText event i wrote below code procedure TBomKitSubkit.CDS1ITEMNOGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin if gbFirst in CDS1.GetGroupState (1) then Text := Sender.AsString else Text := ''; end; everthing works well. My Query result looks like below in a DBgrid ITEMNO..SUBITEMNO..QTY AA1...........XX1.......................1 XX2.......................2 XX3.......................1 AA2..........XX4.......................3 Is it possible get the result like below, (First SUBITEMNO not just right of of ITEMNO but 1 line bottom) ITEMNO..SUBITEMNO..QTY AA1 XX1...................1 XX2....................2 XX3....................1 AA2 XX4.......................3 Thank You
×