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

Reading DB-cells into textboxes...!

Status
Not open for further replies.

adamsoderqvist

Programmer
Sep 8, 2001
136
SE
Hi,

this might be more of a database question, but hey... ;=)

When I get my info from a DB (I use Access) and want to read it into a textbox, like:

<INPUT TYPE=TEXT NAME=MyText VALUE=<%=objRS(&quot;MyInfo&quot;)%>>

it dont pick up more than the FIRST WORD - if there are more words than one in the cell, that is.(else there's no problem!). (And yes, it does get the whole information from the cell. I know this since I've printed the query in regular text, and there's no problem then!)

Why is this - and what to do about it?

//Thanx
 
You need to have quotes in your input:

<INPUT TYPE=TEXT NAME=MyText VALUE=&quot;<%=objRS(&quot;MyInfo&quot;)%>&quot;>
 
I never get this right myself, but...

<INPUT TYPE=TEXT NAME=MyText VALUE=&quot;<%=objRS(&quot;MyInfo&quot;)%>&quot;>

I think you need quotes around it.
 
I believe in the examples you've been given, the quotes around MyInfo need to be single quotes so:

<INPUT TYPE=TEXT NAME=MyText VALUE=&quot;<%=objRS('MyInfo')%>&quot;>

hth
mb
:)
&quot;Where's the Ka-Boom? There's supposed to be an Earth-shattering Ka-Boom!&quot;
Marvin the Martian
 
Nope, since the ASP is processed server-side, you can use double or single quotes, whatever suits your fancy
 
try a

<% response.write objRS(&quot;MyInfo&quot;) %>

and see what you get.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top