Disappearing Carriage Returns - frankvfo

08-May-08 02:34:00
Stored Procedure to populate a gridview control (ASP 2.0) works fine except
all the carriage returns I insert to enable multi-line text output disappear
in the final select statement! Everything comes out as a single line of text
with spaces where the 13's should be. SQL Server 2000. I am totally stumped.
Is there a switch I need to set in SQL somewhere?

Frank Fox
Hendersonville, Tennessee
button
 
 

Disappearing Carriage Returns - Russell Fields

08-May-08 02:48:04
Frank,

If you were to run the stored procedure from SQL Server 2000 Query Analyzer,
you would see two different things.

Results in Grid - The carriage returns would disappear, just as you are
seeing.
Results in Text - A long series of carriage returned data.

You can experiment with this using the following command:
select top 10 text from syscomments
where text is not null
order by text

So, I don't think it is SQL Server, but the grid control that you need to
think about.

FWIW,
RLF
button
 

Disappearing Carriage Returns - frankvfo

09-May-08 10:11:02
Russell,

It's been so long since I last used Results In Text I forgot about it.
Thanks for the help. The text display does indeed show the carriage return
characters to be present.

Unfortunately the gridview control cannot render char(13) natively in the
cell. It has multiline capability but centers the text like a label without
regard to content. It splits phone numbers in half for instance. We wanted
name and address on two different lines. We'll have to live with it for now.

Microsoft should note native carriage return rendering into a new line would
be a welcome addition to the gridview.

Frank
button
 
Searching text fields without full text search?