|
 |
access_asp thread: Managing Text from Access DB to ASP Web page?
Message #1 by Bob Maarschalkerweerd <BobM@h...> on Wed, 13 Mar 2002 15:01:43 -0500
|
|
Does anyone know how to manage text from Access database (Text or Memo
field) and format that output on an ASP web page. I get a long continuous
stream of data that I need to manage or format correctly. I need to somehow
imbed Carriage Return and Line Feed characters "chr(13) & chr(10)" into the
text or Memo field within Access.
How do I do that?? or Is there some other devious method I have overlooked
somewhere.
Firstly can this be done using Access, and secondly, Do I need to format the
data some other way?
Could Someone please help me with that one..
Regards,
Bob Maarschalkerweerd
-------------------------------------
Ph (xxx) xxx-xxxx
Fax (xxx) xxx-xxxx
Cell (xxx) xxx-xxxx
MAIL - mailto:bobm@h...
WEB - http://www.hch-nc.com
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 14 Mar 2002 10:08:32 +1100
|
|
Use a <textarea> HTML element.
When you press [enter] those carriage returns will be entered as Chr(13) &
Chr(10) in your database.
Alternatively you could use your own character sequence (eg [enter]) and
then do a Replace() and replace those with the necessary ASCII.
Tip: VBScript has an inbuilt constant for a carriage return/line feed combo:
vbCrLf
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Bob Maarschalkerweerd" <BobM@h...>
Subject: [access_asp] Managing Text from Access DB to ASP Web page?
: Does anyone know how to manage text from Access database (Text or Memo
: field) and format that output on an ASP web page. I get a long continuous
: stream of data that I need to manage or format correctly. I need to
somehow
: imbed Carriage Return and Line Feed characters "chr(13) & chr(10)" into
the
: text or Memo field within Access.
:
: How do I do that?? or Is there some other devious method I have overlooked
: somewhere.
:
: Firstly can this be done using Access, and secondly, Do I need to format
the
: data some other way?
:
: Could Someone please help me with that one..
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by jake williamson 28 <jake.williamson@2...> on Thu, 14 Mar 2002 09:52:36 +0000
|
|
hello bob,
i'm pretty sure this has more to do with how you set up the text field that
enters the data in you form. the 'wrap' tells the browser whether it should
use soft or hard carriage returns.
here's the stuff i found in ultradev,
hope it helps,
jake
WRAP NN 2=A0=A0 IE 4=A0=A0 HTML n/a
WRAP=3D"wrapType" Required
=A0
The WRAP attribute tells the browser whether it should wrap text in a
TEXTAREA element and whether wrapped text should be submitted to the server
with soft returns converted to hard carriage returns. Navigator and Interne
t
Explorer don't agree fully on the possible values, and the HTML
specification is silent on the subject. Even so, there are cross-browser
solutions.
If WRAP is turned off (the default), the TEXTAREA element activates the
horizontal scrollbar as characters exceed the original column width. A pres
s
of the Return/Enter key causes the cursor to advance to the next line back
at the left margin. To submit the content without the word-wrapped soft
returns converted to hard carriage returns (in other words, submitted as
typed), set the WRAP attribute by including the attribute like a Boolean
value. To convert the soft returns to hard carriage returns (and thus
preserving the word-wrapped formatting in the submitted content), set the
value of WRAP to hard. Both Navigator and Internet Explorer recognize this
setting, whereas Navigator does not recognize IE's value of physical.
=A0
Example
<TEXTAREA NAME=3D"comments" WRAP></TEXTAREA>
=A0
Value
The presence of the WRAP attribute (without any assigned value) engages wor
d
wrapping (and filters soft returns before being submitted). A value of hard
also engages word wrapping and converts soft returns to CR-LF characters in
the value submitted to the server. A value of off or no attribute turns wor
d
wrapping off. Recognized values are as follows:
Value NN IE
hard
* *
off
* *
physical
- *
soft
* -
virtual
- *
on 13/3/02 20:01, Bob Maarschalkerweerd at BobM@h... wrote:
> Does anyone know how to manage text from Access database (Text or Memo
> field) and format that output on an ASP web page. I get a long continuous
> stream of data that I need to manage or format correctly. I need to someh
ow
> imbed Carriage Return and Line Feed characters "chr(13) & chr(10)" into t
he
> text or Memo field within Access.
>
> How do I do that?? or Is there some other devious method I have overlooke
d
> somewhere.
>
> Firstly can this be done using Access, and secondly, Do I need to format
the
> data some other way?
>
> Could Someone please help me with that one..
>
> Regards,
> Bob Maarschalkerweerd
Message #4 by Bob Maarschalkerweerd <BobM@h...> on Thu, 14 Mar 2002 07:53:54 -0500
|
|
Hi Jake,
Thanks for that information. I have tried your suggestion in my
JavaScript
code.. I get the box as expected, but I don't get the expected
description
of what I want in the box. Here is a copy of the code I have:
1 Response.Write "<TEXTAREA NAME=3D"'description'" WRAP>"
2''''Response.Write objRS("description") & "<P>"
3 Response.Write objRS("description")
4 Response.Write "<P>"
5 Response.Write "</TEXTAREA>"
The commented line 2 is what works, but the data is not formatted.. I
have
added in the rest of the lines as you suggested. If I omit line 4 I get
the
rest of my HTML I created in the TEXTAREA, (ALL the rest of my web
page) but
not my description I'm pulling from the database. Am I missing or
overlooking something?
Regards,
Bob Maarschalkerweerd
-------------------------------------
Ph (xxx) xxx-xxxx
Fax (xxx) xxx-xxxx
Cell (xxx) xxx-xxxx
MAIL - mailto:bobm@h...
WEB - http://www.hch-nc.com
-----Original Message-----
From: jake williamson 28 [mailto:jake.williamson@2...]
Sent: Thursday, March 14, 2002 4:53 AM
To: Access ASP
Subject: [access_asp] Re: Managing Text from Access DB to ASP Web page?
hello bob,
i'm pretty sure this has more to do with how you set up the text field
that
enters the data in you form. the 'wrap' tells the browser whether it
should
use soft or hard carriage returns.
here's the stuff i found in ultradev,
hope it helps,
jake
WRAP NN 2=A0=A0 IE 4=A0=A0 HTML n/a
WRAP=3D"wrapType" Required
=A0
The WRAP attribute tells the browser whether it should wrap text in a
TEXTAREA element and whether wrapped text should be submitted to the
server
with soft returns converted to hard carriage returns. Navigator and
Internet
Explorer don't agree fully on the possible values, and the HTML
specification is silent on the subject. Even so, there are
cross-browser
solutions.
If WRAP is turned off (the default), the TEXTAREA element activates the
horizontal scrollbar as characters exceed the original column width. A
press
of the Return/Enter key causes the cursor to advance to the next line
back
at the left margin. To submit the content without the word-wrapped soft
returns converted to hard carriage returns (in other words, submitted
as
typed), set the WRAP attribute by including the attribute like a
Boolean
value. To convert the soft returns to hard carriage returns (and thus
preserving the word-wrapped formatting in the submitted content), set
the
value of WRAP to hard. Both Navigator and Internet Explorer recognize
this
setting, whereas Navigator does not recognize IE's value of physical.
=A0
Example
<TEXTAREA NAME=3D"comments" WRAP></TEXTAREA>
=A0
Value
The presence of the WRAP attribute (without any assigned value) engages
word
wrapping (and filters soft returns before being submitted). A value of
hard
also engages word wrapping and converts soft returns to CR-LF
characters in
the value submitted to the server. A value of off or no attribute turns
word
wrapping off. Recognized values are as follows:
Value NN IE
hard
* *
off
* *
physical
- *
soft
* -
virtual
- *
on 13/3/02 20:01, Bob Maarschalkerweerd at BobM@h... wrote:
> Does anyone know how to manage text from Access database (Text or
Memo
> field) and format that output on an ASP web page. I get a long
continuous
> stream of data that I need to manage or format correctly. I need to
somehow
> imbed Carriage Return and Line Feed characters "chr(13) & chr(10)"
into
the
> text or Memo field within Access.
>
> How do I do that?? or Is there some other devious method I have
overlooked
> somewhere.
>
> Firstly can this be done using Access, and secondly, Do I need to
format
the
> data some other way?
>
> Could Someone please help me with that one..
>
> Regards,
> Bob Maarschalkerweerd
|
|
 |