Wrox Programmer Forums
|
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
 
Old February 28th, 2004, 06:05 PM
Authorized User
 
Join Date: Feb 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to sinner
Default 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") %>">

 
Old February 28th, 2004, 06:19 PM
Authorized User
 
Join Date: Feb 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to sinner
Default

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

 
Old February 28th, 2004, 07:53 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.
 
Old February 28th, 2004, 10:16 PM
Authorized User
 
Join Date: Feb 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to sinner
Default

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 :)

 
Old March 1st, 2004, 04:07 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
quote:I OWE A HAINEKEN. CHEERS :)
Ha, Cheers, mate.... ;)


Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Clone DAO Recordset into ADO Recordset kamrans74 VB How-To 0 March 6th, 2007 11:57 AM
ADODB.Recordset (0x800A0CB3)Current Recordset does tks_muthu Classic ASP Databases 0 June 16th, 2005 07:22 AM
Convert ADO recordset to DAO recordset andrew_taft Access 1 May 5th, 2004 02:31 PM
using fields in recordset to populate textbox stoneman Access 2 October 7th, 2003 11:03 AM
Masked TextBox & formatting TextBox melvik C# 1 September 22nd, 2003 11:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.