Insert data from database into text field

Results 1 to 2 of 2

Thread: Insert data from database into text field

  1. #1
    Join Date
    Dec 1969

    Default Insert data from database into text field

    I am trying to insert data from a database into a text field and a drop down box. The textfield is called NewUser and the drop down is called AdminUser.<BR>I tried something like this:<BR>ExtractSQL = "SELECT * FROM Employees WHERE [Employee ID] = &#039;" & NewUserID & "&#039;;"<BR>set rsDisplayEmployee = dbPhoenixTime.Execute(ExtractSQL)<BR> <BR>if (NewUserID = rsDisplayEmployee.Fields("Employee ID").Value) then<BR><BR>NewUser = Response.write(rsDisplayEmployee.Fields("Employee Name").Value)<BR>AdminUser = Response.write(rsDisplayEmployee.Fields("Admin User").Value)<BR>end if<BR><BR>this just gives me back the values from the database but does not insert it into the textfield. How do you do this?<BR><BR>Thanks in advance.<BR>

  2. #2
    Join Date
    Dec 1969

    Default Might I gently suggest...

    ...that you get a good tutorial and learn the basics of how ASP and HTML work together?<BR><BR>If you are impatient, you might start on the "lessons" at<BR><BR>Truthfully, I&#039;m amazed you don&#039;t get errors from that code.<BR><BR>And I don&#039;t pretend to know what it means to put a single value into a &#060;SELECT&#062;, as you say you want to do with AdminUser.<BR><BR>One hint: ASP knows *NOTHING* about the names of the fields in your HTML form. Zero. Zip. Nada.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts