Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Delphi 5 - TString

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

610 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