?
Solved

Delphi 5 - TString

Posted on 2001-07-19
4
Medium Priority
?
720 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 225 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

777 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