RE: Full string not displayed (solved)
by "Shull, Conrad" <cshull(at)shscares.org>
|
| Date: |
Mon, 20 Mar 2000 11:18:20 -0500 |
| To: |
"'hwg-languages(at)hwg.org'" <hwg-languages(at)hwg.org> |
| |
todo: View
Thread,
Original
|
|
I figured it out.
<input type='text'> value=" & rs(ca) & " size=10 name='ca" & i & "'>
needed a set of single quotes around the retrieved record thusly:
<input type='text'> value='" & rs(ca) & "' size=10 name='ca" & i & "'>
Anyone know why it causes a difference in results? (I do realize the value
of "value" is supposed to be in quotes in correct HTML)
Thanks.
__________________________________
Conrad Shull
Information Technology Associate
Learning Resources Center
Susquehanna Health System
www.shscares.org
cshull(at)shscares.org
webmaster(at)shscares.org
570.321.2266
> -----Original Message-----
> From: Shull, Conrad
> Sent: Monday, March 20, 2000 8:35 AM
> To: 'hwg-languages(at)hwg.org'
> Subject: Full string not displayed when retrieved from DB
>
>
> I have a form that populates text boxes with data previously
> entered via SQL
> on an Access DB using ASP.
>
> The purpose of the form is to edit the previously entered
> data. It works
> fine, except that it displays, in the text boxes, only that
> text up to the
> first space character. For example, if the Client, "Smith
> Company" was
> initially entered into the DB, only "Smith" is displayed in
> the text box. In
> the actual database, the full string is present.
>
> In the following VBScript, "ca" means "Client A", "dm" means
> "days in the
> month" and "i" is appended to "ca" to indicate "Client A" on
> a particular
> day of the month. I skipped including the rest of the SQL and record
> retrieval lines (they work fine) and included only the "While
> Not rs.EOF"
> line to indicate that this script does go through all the records.
>
>
> While Not rs.EOF
>
> Dim ca
> for i = 1 to dm
> i = Cstr(i)
> ca = "ca" & i
> if Trim(rs(ca)) <> "" then
> Response.Write "<tr><td align='center'><input type='text'
> value=" & rs(ca) &
> " size=10 name='ca" & i & "'></td></tr>"
> else Response.Write "<tr><td align='center'><input
> type='text' value=''
> size=10 name='ca" & i & "'></td></tr>"
> end if
> next
>
> __________________________________
> Conrad Shull
> Information Technology Associate
> Learning Resources Center
> Susquehanna Health System
> www.shscares.org
> cshull(at)shscares.org
> webmaster(at)shscares.org
> 570.321.2266
>
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.