Problem with string output

Results 1 to 2 of 2

Thread: Problem with string output

  1. #1
    Kris Bailey Guest

    Default Problem with string output

    I am having a problem that I can&#039t seem to figure out.<BR>I have a couple of ASP forms. The first, takes what the user inputs in the text boxes or selects and populates the database (with no Problem). Example: one of the fields they select is there user name. Lets say ("Bailey, Kris").<BR><BR>The second form Shows them every item that they just submitted.<BR>All the information is displayed into columns and rows in a table and still the information is correct. Ex("Bailey, Kris")<BR><BR>The third form however is my problem. On this form I am giving the user the ability to edit the fields of the item they just selected. So I populate the Text Boxes by pulling the information from the database. When it pulls the name ("Bailey, Kris") into a text box it only displays ("Bailey, ") but if I just display it rather that placing it into a text box it comes out fine. Weird Huh? By the way I have gone through the database and verified the information is all there and it is. <BR>It seems to be only pulling the first word out of the whole string for some reason. Can anyone give me any insight on why this is happening or what I can look into doing to correct it. Thanks! <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Problem with string output

    I&#039ve done something similar before...However the input is stored as char in database.<BR> I believe you stored the data in a recordset when you pull them out of the database. So lets say you stored the "Bailey,kris" in a variable call Empname when you extract the name from the recordset.In order to reflect the name in the textbox, you should have following code :<BR>Name :<BR>&#060;INPUT name=name1 value="&#060;% = response.write(Empname)%&#062;"&#062;

Posting Permissions

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