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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable to edit in text box without hitting delete key 1

Status
Not open for further replies.
Nov 29, 2001
72
US
First, excuse my ignorance here.

When users bring up a record for editing, they have to hit the delete key to gain spaces in the text boxes to edit. I have looked for a way to make the entire box space available for editing without having to hit the delete key to gain spaces but have been unable to find anything.

Does anyone have an answer out there?

Thanks in advance,
Dave
 
It is an ASP form with text boxes filled with information from a SQL table.

The information gets displayed correctly from the SQL table, but when editing one needs to hit the delete key if the new text has more characters than the displayed text.

When inputing into fields that currently have no information, the user must hit the delete key to gain space to enter.

Is this enough?
 
Hi Dave,
Actually not enuf. But I can make a guess. In your SQL table, you defined the field as char(xxx)? Maybe you may want to consider varchar(xxx) instead. The difference is that for char(x), the field is fixed to that size and will padd the end with 'space', so when your form loads it, the field is actually filled with 'spaces', even for new records. varchar(x) will give you a variable sized field and will not automatically pad the end with 'spaces' ... hope this helps. cheers.

regards,
- Joseph ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Shopping --> , Soccer --> ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
 
Well actually that makes sense. You're right. I am defining the character in the table as "char". I will give it a shot.

Thanks for your help,
Dave
 
To complete Joseph's excelent post, I'll add that (in general), varchars take lower place on HD than char because they only use what the need while char will always use the max place :
varchar(2000) containing "tek-tip" will take 7 bytes
char(2000) containing "tek-tip" will take 2000 bytes
Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top