Display data into TextArea from Database

How can i display data from a Database into a TextArea in different lines.ie. i want the o/p as
--------------
ccccc
xxxx
tttt
uuuuu
--------------
padmamvsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

xabiCommented:
Make this:

..
..
tmp = ""
while not(rs.EOF)
  tmp = tmp & rs.fields("myfield") & VBCrLf
  rs.movenext
wend
rs.close
..
..
<html>
<textarea><%=tmp%></textarea>
..
..


xabi
0
robbertCommented:
<%
Set conn = Server.CreateObject("ADODB.Connection")
Set rec = Server.CreateObjcect("ADODB.Recordset")

conn.Open "ConnectionString"

sq = "SELECT myCol FROM myTable"
rec.Open sq, conn

txt = ""
Do While Not rec.EOF
  txt = txt & rec("myCol") & vbCrLf 'line break
  rec.MoveNext
Loop

rec.Close
conn.Close
Set rec = Nothing
Set conn = Nothing
%>

<html><head></head><body><form>

<textarea><%=txt%></textarea>

</form></body></html>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
xabiCommented:
Robert:

As you can see you say exactly the same as me. Are you only trying to get all points you want. I just give a comment waiting for his questions and you proposed my comment as an answer. Yes, you can say:

I wrote the whole code.
Yes, you are right. I didn't wrote the whole code cuase he didn't ask for it. Now what must I do? Write your code plus an intruduction to ASP?

xabi
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

robbertCommented:
Sorry,
I always open all unread questions in new windows, then go offline, and work on them, then go online and post answers and comments.
If our answers will be accepted, I'll post a question for you, so that you can get "your" points.
0
xabiCommented:
Don't worry about points, it doesn't matter. I was just trying to explain how we must work in EE. Anything more.
0
xabiCommented:
And sorry for my English, It's my 4th language.
0
robbertCommented:
padmanvs,
thank you for accepting the answer. What could I have had improved for to receive an A grade? ;-)

xabi,
you'll find a question for you, named "For Xabi - Session.LCID".
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.