posting data to a field

Results 1 to 3 of 3

Thread: posting data to a field

  1. #1
    Mike Reyes Guest

    Default posting data to a field

    I to am new to ASP and my question is similiar to the one posted by "Pengu" I&#039;ve tried the suggestions that developers have responded with. However, I&#039;m not getting the results I expect. I can query the DB and have it write out to the page. I just can&#039;t extract specific data and have it show up where I want it. <BR><BR>This portion works:<BR><BR>Set RSEmps = Server.CreateObject("ADODB.Recordset")<BR><BR> &#039; -- Retrieve the database information using the data source for the Employee Database<BR> RSEmps.Open strSQLSearch, ConnectString<BR><BR> &#039; -- Loop through the employee records in the Recordset Object until End Of File<BR> Do While Not RSEmps.EOF<BR> <BR> Response.Write "&#060;TABLE&#062;"<BR> Response.Write "&#060;TR&#062;"<BR> <BR> For Each MyField in RSEmps.Fields<BR> Response.Write "&#060;TD&#062;" & MyField.Name & "&#060;/TD&#062;"<BR>Next<BR> <BR> Response.Write "&#060;TD&#062;" & RSEmps(MyField.Name) & "&#060;/TD&#062;"<BR> <BR> Loop<BR> <BR> RSEmps.close<BR> <BR> set RSEmps = nothing<BR><BR><BR>This does not:<BR><BR>&#060;Input Type = "Text" size = "24" maxlength = "50" name = "txtLastOut" value = "&#060;%=RSEmps(MyField.last)%&#062;" &#062;<BR><BR>My intent is to have it extract employee data from the DB and populate a form which will be used for updating the employees record.<BR><BR>I appreciate any help I can get with this.

  2. #2
    danscan Guest

    Default RE: posting data to a field

    your recordset is set to nothing. before you use the <BR>RSEmps(myfield.last).<BR><BR>Set it to a varible. or set the recordset to nothing after you use it.<BR><BR>If that is not it then your record does not exist or that field does not exist.

  3. #3
    Join Date
    Dec 1969

    Default RE: posting data to a field

    Thanks for the info, however...Where do I declare the variable? In the asp coding itself? If the Input Type is outside of the script itself, how does the value inside the script get assigned to the "value = " in the Input type? Confused..............

Posting Permissions

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