 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

February 28th, 2004, 06:05 PM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Recordset into textbox
You guys hate me yet????
ANyways, after succesfully setting up my queries etc.(with a HUGE help from you guys), I now need to dump it into textbox. I have no idea how to do it. I konw how to display it by Response.write and building table on the fly but dont know how to output it to a texbox.
Here is what i have:
<%
Set rs = SERVER.CreateObject("ADODB.Recordset")
strST=Request.QueryString("open")
strSQL = "SELECT * FROM ticket WHERE PSAP = '" & strST & "'"
' Open Recordset Object
rs.Open strSQL,conn,adOpenStatic
%>
<p>PSAP NAME:<input type="text" name="PSAP" size="50" value="<% rs("PSAP") %>">
|
|

February 28th, 2004, 06:19 PM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
nevermind, I got it
PSAP NAME:<input type="text" name="PSAP" size="50" value="<%= rs.fields("PSAP") %>"></p>
but the page does not display it...when I view source I can see there, meaning value changes to the selected item but it is invisible.???
HEEELPP
yes, I suck....but any help is appriciated
|
|

February 28th, 2004, 07:53 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Do you see the actual text in the source, but not in the browser? Strange.
The only cause that I can think of is that rs.fields("PSAP") (or rs.fields("PSAP").Value, actually), contains a double quote. You can use Server.HTMLEncode to encode your HTML:
<input type="text" name="PSAP" size="50" value="<%=Server.HTMLEncode(rs.Fields("PSAP").Valu e %>">
If I were you, I'd get a book on this subject. Beginning Dreamweaver MX 2004 deals a lot with these kind of ASP issues. Also, Beginning ASP 3 is a good book.
Did you sort out the other issues?
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

February 28th, 2004, 10:16 PM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hey Imar,
Reason why it wasnt displaying it was because my text box wasnt in the <FORM<. As soon as I wrapped it in form tags I could see it fine. Thank you once again.
I also managed to work out the other issues. I OWE A HAINEKEN. CHEERS :)
|
|

March 1st, 2004, 04:07 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
quote:I OWE A HAINEKEN. CHEERS :)
|
Ha, Cheers, mate.... ;)
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
 |