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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying text from mySql DB

Status
Not open for further replies.

JonathanG6SWJ

Programmer
Jan 18, 2005
39
GB
I am having trouble displaying text from a mySql DB.

I have a field in a DB of type "medium text". I sucessfully diplay these on my asp page asigning them to a variable altText=RS("dbfield") and then outputting using response.write. All works ok. I have another field of "medium text" and use the same way to output field but if field conatins one two three i get
one
two
three
as though a carriage return has been placed on the end of each word

What am I doing wrong / overlooking

Many thanks in advance
Jonathan
 
how was the text entered into the DB? Did you enter it manually or was it done through a form textarea?

Tony
_______________________________________________________________
 
Hi Tony
The working text was exported from an MS Access table. The text that does not work was typed straight into table using MySQL Control Center.
Jonathan
 
Hi Tony
Answer to 2nd question was - it's just a string one two three - no line breaks or other control characters lurking!

Your first question prompted me to recreate the table & data in Access, delete mySql table and export new access table to mySql. I've done that and it works all OK.

So I think inadvertantly your question solved my problem. When I've got more time I'll back track and try to recreate problem - never come across that before Possibly never again. I wonder if somehow the table in mySql got corrupted.

Thanks for your help
Jonathan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top