Data type text response.write into a text area tro

Results 1 to 6 of 6

Thread: Data type text response.write into a text area tro

  1. #1
    Join Date
    Dec 1969
    Posts
    538

    Default Data type text response.write into a text area tro

    I get error when I try to write out the contents of a field that is text data type(note: it is not char or varchar).<BR>Into a textarea form field.<BR>?????

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: Data type text response.write into a text area

    We need to see your code to help. It should look like:<BR><BR>&#060;TEXTAREA ...&#062;&#060;%=objRS("TextFieldFromDatabase")%&# 062;&#060;/TEXTAREA&#062;<BR><BR>Hope this helps!

  3. #3
    Join Date
    Dec 1969
    Posts
    538

    Default HERE IS THE CODE! Data type text response.write in

    Here is the code. Remember condition is varchar and it works, but<BR>description is text and the code below does not work.<BR>+++++<BR>Set RecordSet = Server.CreateObject("ADODB.Recordset")<BR>RecordSe t.Open cmdDC, , 0, 2<BR> <BR>CONDITION<BR>&#060;input type="text" name="CONDITION" size="40" value="&#060;%= RecordSet.Fields("CONDITION") %&#062;"&#062;<BR>Description<BR>&#060;textarea name="DESCRIPTION" rows="4" cols="25"&#062;<BR> &#060;%= RecordSet.Fields("DESCRIPTION") %&#062;"&#062;<BR>&#060;/textarea&#062; <BR>+++++

  4. #4
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: HERE IS THE CODE! Data type text response.writ

    Rather than:<BR>&#060;textarea name="DESCRIPTION" rows="4" cols="25"&#062;<BR>&#060;%= RecordSet.Fields("DESCRIPTION") %&#062;"&#062;<BR>&#060;/textarea&#062; <BR><BR>do:<BR>&#060;textarea name="DESCRIPTION" rows="4" cols="25"&#062;<BR>&#060;%= RecordSet.Fields("DESCRIPTION") %&#062;<BR>&#060;/textarea&#062; <BR><BR>Note that I got rid of a "&#062; on the end of your 2nd line of code. Are you getting an error, or is the text just not showing in the textarea?<BR>


  5. #5
    Join Date
    Dec 1969
    Posts
    538

    Default I FIXED IT

    I changed this<BR>RecordSet.Open cmdDC, , 0, 2<BR>to<BR>RecordSet.Open cmdDC, , 1, 3<BR>and now it works.<BR>I don&#039t fully understand this 1,3, adlock stuff could you do an article about it?

  6. #6
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: I FIXED IT

    There are already some good articles on cursors and locktypes for recordsets:<BR><BR>Choosing the Right Cursor for the Job<BR>http://4guysfromrolla.com/webtech/112998-1.shtml<BR><BR>Cursor & LockType Performance Issues<BR>http://4guysfromrolla.com/webtech/062799-3.shtml<BR><BR>These two should get you started. Be sure to search 4guys for related articles! :-)<BR><BR>Happy Programming!

Posting Permissions

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