Re: How do I preserve carriage returns in SQL?
From: Daniel Crichton (msnews_at_worldofspack.co.uk)
Date: 03/21/05
- Next message: Cacho: "Query problem"
- Previous message: Joseph Geretz: "Re: How do I preserve carriage returns in SQL?"
- In reply to: Joseph Geretz: "Re: How do I preserve carriage returns in SQL?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 21 Mar 2005 19:05:10 -0000
Joseph wrote on Mon, 21 Mar 2005 13:42:59 -0500:
> Hi Dan,
>
> Thanks for your reply. You are absolutely correct. We are submitting the
> SQL through the ADO Connection.Execute method. However, I did find a bit
> of code which was replacing vbCrLf with " ". Duh! :-)
>
> Anyway, with that out of the way, I'm finding that the data makes its way
> into the table complete with carriage returns. Or more precisely, complete
> with line feeds. I'm finding on the retrieval side that I need to execute
> the following string replacement in order for the data to display
> correctly in a multi-line textbox.
>
> RS("Alert") = Replace(RS("Alert"), vbLf, vbCrLf)
>
> I'm guessing that if I'd be writing this to the table via a Recordset this
> wouldn't be an issue. This is the way most of our database updates are
> applied and I've never noticed carriage returns to be an issue. However,
> since we're doing this particular update via embedded SQL it seems that
> line-breaks go into the database as the vbLf character, while a vbCrLf is
> needed in order to properly display a newline in a textbox.
>
> Does this sound correct?
Just checked what SQL Query Analyzer (I'm using the SQL 2000 version) wrote
into my row, it has both CR and LF as the line breaks. Where is your SQL
statement coming from? The source of the issue will be whatever is writing
that data into the row.
Dan
- Next message: Cacho: "Query problem"
- Previous message: Joseph Geretz: "Re: How do I preserve carriage returns in SQL?"
- In reply to: Joseph Geretz: "Re: How do I preserve carriage returns in SQL?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|