Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing and Retrieving Carriage Return Line Feeds - vbCRLF

Status
Not open for further replies.

sylvanst

Programmer
Jan 15, 2003
8
US
I'm having trouble inserting a vbCRLF within variable text into a SQL server database field. I'm trying to do something like:

sText = sLogon & chr(13) & chr(10)
objForm.ADORecordset("fieldname") = sText

Or

sText = sLogon & vbCRLF
objForm.ADORecordset("fieldname") = sText

and then trying to later retrieve that database field text with stored Carriage Return Line Feeds and have it break properly in a Response.Write statement like:

response.write objForm.ADORecordSet("fieldname")

This method does not seem to work. The output just wraps with no breaks. Do I need to do a parse routine or something to get my desired results? I don't think the CRLF's are being saved to the database field.
 
how do you know your database field can store breaks and lines feeds etc???

cant you just do

response.write objForm.ADORecordSet("fieldname") & chr(13) & chr(10)

that way you dont have to store all those chr(13) and chr(10) in each field of your database? thats if you can of course
rgd
mrmovie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top