SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 25th, 2001, 05:48 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Line feeds, carraige returns etc.....memo field....

<i><b>Originally posted by : Mal (mal@go-planit.com)</b></i><br /> I'm really new to ASP so some help would be really appreciated.<br />I have a DB that returns data to a table in a ASP page, this works no problems EXCEPT it doesn't return the line feeds, carraige returns... here's the code.<br /><br /><% Set MyConn=Server.CreateObject("ADODB.Connection")<br />MyConn.Open "PROVIDER=MSDASQL;" & _<br />"DRIVER={Microsoft Access Driver (*.mdb)}; " & _<br />"DBQ=" & server.mappath("my.mdb")<br />MySQL="Select News.Text1, News.Text2 from News"<br />Set MyRs=MyConn.Execute(MySQL)<br />%><br /><div align="center"><br /><center><br /><table border=0 width="100%" cellspacing="0" cellpadding="0"><br /><tr><% 'Put Headings On The Table of Field Names<br />howmanyfields=MyRs.fields.count -1<br />for i=0 to howmanyfields %><br /><% next %><br /></tr><br /><% ' Get all the records<br />do while not MyRs.eof %><br /><tr><br /><% for i = 0 to howmanyfields<br /> ThisRecord = MyRs(I)<br /> If IsNull(ThisRecord) Then<br /> ThisRecord = " "<br />end if %><br /> <td valign=top><br /> <p style="margin-left: 25; margin-right: 25; margin-top: 20"><font face="Arial, Helvetica, sans-serif" size="-1"><%=Thisrecord%></font></td><% next %><br /></tr><br /><%MyRs.movenext<br />loop%><br /></table><br /></center><br /></div><br /><%MyRs.close<br />Set MyRs= Nothing<br />MyConn.Close<br />set MyConn=nothing%><br /><br />I've seen this thread on another forum that advises this:-<br /><br />strNote = RS("note")<br />strNote = Server.HTMLEncode(strNote)<br />strNote = Replace(strNote, vbCrLf & vbCrlf, "<p>")<br />strNote = Replace(strNote, vbCrLf, "<br>")<br /><br />So it looks like the solution to my problems, but I don't know how to intigrate it/what to change/where to put it in my above code. Any help would be much appreciated. <br />

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Line feeds, carraige returns etc.....memo field....


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway