"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message news:<uR*************@tk2msftngp13.phx.gbl>...
What is "it"? Can you show the code that causes this bizarre symptom?
"it" is simply the text from the access database. All I am doing is
trying to display a text field from the Access database onto a web
page. So maybe it's an Access question. How do you get the Access
database to store the carriage returns from the web form input page?
I will repeat what I said before. You don't do anything to store the
carriage returns any differently. You simply replace them with HTML
carriage returns (<br>) when you DISPLAY the text. If you read the link I
posted, you will understand, perhaps, what I mean.
If not, I will ask once more, with a little emphasis on the part of this
equation we need in order to help you.
Can you *****///SHOW THE CODE///***** that causes this bizarre symptom,
instead of describing it with narrative? Do you know how many different
ways one could interpret, "All I am doing is ... "?
Actually, the that was supplied did explain what to do very well and
it did work. I put up the last post just to clarify my original post
since there seemed to be a little confusion about what I was asking.
I probably should have waited until I had a chance to go through the
suggested article (and, yes, I should have provided the code as
requested. I've provdided both the before and after code below so
people with the same problem can quickly see the correction.
ORIGINAL CODE
<%
Dim Conn, cStr, sql, number
number = [response.write request("number")]
set conn = Server.CreateObject("ADODB.Connection")
cStr = "DRIVER={Microsoft Access Driver (*.mdb)};"
cStr = cStr & "DBQ=" & Server.MapPath("../../db/database1.mdb") & ";"
Conn.Open(cStr)
sql = "SELECT * FROM jobs WHERE ""job number"" = '" &
request("number") & "'"
set rs = conn.execute(sql)
do while not rs.eof
description = rs("description")
response.write(description)
rs.movenext
loop
%>
NEW CODE
<%
Dim Conn, cStr, sql, number
number = [response.write request("number")]
set conn = Server.CreateObject("ADODB.Connection")
cStr = "DRIVER={Microsoft Access Driver (*.mdb)};"
cStr = cStr & "DBQ=" & Server.MapPath("../../db/database1.mdb") & ";"
Conn.Open(cStr)
sql = "SELECT * FROM jobs WHERE ""job number"" = '" &
request("number") & "'"
set rs = conn.execute(sql)
do while not rs.eof
description = rs("description")
response.write(replace(description, CHR(10), CHR(10) &
" <br>"))
rs.movenext
loop
%>