Getting my Linebreaks back when retrieving from a

Results 1 to 3 of 3

Thread: Getting my Linebreaks back when retrieving from a

  1. #1
    Emiel Langeberg Guest

    Default Getting my Linebreaks back when retrieving from a

    Maybe a stupid question, but how can I read a record from a ACCESS database with line-breaks? The record looks like this:<BR><BR><BR>Hello,<BR><BR>This is a test to see<BR>If I can get linebreaks in<BR>my ASP-script<BR><BR><BR><BR>I&#039m using this script to retrieve the information:<BR>&#060;%<BR>set conntemp=server.createobject("adodb.connection")<B R> "MyDatabase"<BR>set rstemp=conntemp.execute("select * from main)<BR>inhoud = rstemp("textRecord").value<BR>response.write(inhou d)<BR><BR><BR>The only thing I get, is:<BR><BR>Hello, This is a test to see If I can get linebreaks in my ASP-script<BR><BR><BR><BR>What am I doing wrong here? How can I get the linebrakes back?

  2. #2
    Join Date
    Dec 1969

    Default RE: Getting my Linebreaks back when retrieving fro

    &#060;%<BR>Function FormatStr(String)<BR>on Error resume next<BR>String = Replace(String, CHR(13), "")<BR>String = Replace(String, CHR(10) & CHR(10), "&#060;/P&#062;&#060;P&#062;")<BR>&#039remove the extra spaces from the BR tag below<BR>String = Replace(String, CHR(10), "&#060; BR &#062;")<BR>FormatStr = String<BR>End Function<BR>%&#062;<BR>&#060;%<BR>inhoud = FormatStr(rstemp("textRecord").value)<BR>%&#062;<B R><BR>Hope this helps...Cheers!

  3. #3
    Join Date
    Dec 1969

    Default Thanks for helping me out!

    Desiree, <BR><BR>Thanks for your help. I didn&#039t look at it this way.. Tried everything with writeLine, etc.<BR>This works perfectly!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts