Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Entry Problems with ASP to SQL Server

Status
Not open for further replies.

jazzsax

Programmer
Oct 18, 2002
13
US
I am having the strangest problems with basic text entry in asp forms. I am returning a record set to update data using a form. If I click on the text box, the cursor is often in the middle of the box and if I type, it's like my keyboard doesn't work. If I highlight the whole field, I can enter text. Another field is suppose to allow entry of up to 40 characters, but it only allows entry of a few characters (even though the length and maxlength in the html are correct).

Also, looking at the source code, the data returns show lots of white space after the actual text (ANSI Padding I suppose for the varchar fields).

Any assistance in getting the cursor and the entry to work would be appreciated. I've created other forms like this and have not experienced these kinds of problems before.

Thanks,

Jason
Austin Texas
 
You won't get padding for varchar fields, but you will for char fields. I expect that's the problem you are having. Another possibility is that the varchar fields are full of spaces (yuck!). Try this when populating the form:

<input name=myName value=&quot;<%=trim(objRS(&quot;fieldName&quot;))%>&quot;> -----------------------------------------------------------------
&quot;Whether you think that you can, or that you can't, you are usually right.&quot;
- Henry Ford (1863-1947)

mikewolf@tst-us.com
 
Ah...such a simple solution...thanks so much!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top