Solved

Delphi 5 - TString

Posted on 2001-07-19
4
718 Views
Last Modified: 2011-10-03
In my Delphi 5 App, I have 2 Controls a Ttable and a TQuery.

I need to retreive the value stored also in Ttable.Filter and in Tquery.Sql properties.

I know both properties store Tstring type data.

Now, the problem is that both properties have assigned strings that contain hard-return (return carriage + line feed). I need to remove those 'characters' from the the Tstring in order to display the values in one single long line (label).

I would appreciate it very much if somebody could give me a hand with this one ASAP.

Milton.
0
Comment
Question by:miltonrodrigueza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Expert Comment

by:Epsylon
ID: 6299445
TTable.Filter is not a stringlist.

To remove the CrLf:

Label1.Caption := StringReplace(TQuery.sqlListBox1.Items.Text, #13#10, ' ', [rfReplaceAll]);
0
 
LVL 13

Accepted Solution

by:
Epsylon earned 75 total points
ID: 6299451
Oops, something went wrong with copy/paste  :o)

Label1.Caption := StringReplace(Query1.SQL.Text, #13#10, ' ', [rfReplaceAll]);
0
 
LVL 1

Expert Comment

by:alx512
ID: 6301109
Why you want to display SQL text in TEdit?
Use TMemo component for this purpose.

Memo1.Lines.Assign(Query1.SQL);
0
 

Author Comment

by:miltonrodrigueza
ID: 6301314
Epsylon,

Hereby I am accepting your answer since it did work properly and indeed it does what I need it to do.

You very well deserve the 75 points. Thanks a lot,

Milton
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question