Forums
This topic is locked
MS SQL and Keep memo text formatting
Posted 08 Oct 2003 12:56:44
1
has voted
08 Oct 2003 12:56:44 Russell Marshall posted:
What field type needs to be used in MS SQL to allow the extension keep memo text formatting to work.Will ntext or varchar work?
Thanks
Davrus
Russell
Replies
Replied 10 Oct 2003 11:04:05
10 Oct 2003 11:04:05 Vince Baker replied:
I assume that when you are trying to display the text that has been entered into a memo box, you are loosing the formatting such as return characters?
If so, this simple adjustment to your line of code displaying on the page should do the trick:
Instead of:
<%=(rsRecordset1.fields.item("Fieldname"
.value)%>
change it to this:
<%=Replace(rsRecordset1.fields.item("Fieldname"
.value, vbcrlf , "<br>"
%>
WHat this actually does is change the vbcrlf (carriage return, line feed) that is stored when the user enters into the memo box in to a <br> break return html command.
Hope this is what you where looking for.
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
If so, this simple adjustment to your line of code displaying on the page should do the trick:
Instead of:
<%=(rsRecordset1.fields.item("Fieldname"

change it to this:
<%=Replace(rsRecordset1.fields.item("Fieldname"


WHat this actually does is change the vbcrlf (carriage return, line feed) that is stored when the user enters into the memo box in to a <br> break return html command.
Hope this is what you where looking for.
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 10 Oct 2003 11:21:18
10 Oct 2003 11:21:18 Russell Marshall replied:
This is great thanks.
Will this work for test returned from both ntext fields and varChar.
Many thanks
Russell
Russell
Will this work for test returned from both ntext fields and varChar.
Many thanks
Russell
Russell
Replied 10 Oct 2003 11:31:35
10 Oct 2003 11:31:35 Vince Baker replied:
I assume so, as the return character should always be stored as vbcrlf and you can replace any character with any other.
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting