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

What's the deal with my textbox?

Status
Not open for further replies.

Jerrycurl

Programmer
Aug 4, 1999
85
US
I have a multiline textbox that is bound to a SQL Server field via a data environment command.  It displays existing data fine, but when I try to enter new data into the empty textbox, nothing appears.  I can move the cursor to anywhere on the first line only.  The only way I can enter any text is if I first select some blank area on the line.  Then I can "overwrite" the blank with my text.  The fact that it allows me to move the cursor to a position to the right of existing text is annoying enough, but this "select-before-type" behavior is unacceptable.  Has anyone ever experienced this sort of thing before?  Any help is appreciated.  Thanks.
 
<br>It seems that the text field is being initialized with blanks or the ever-annoying chr(0).&nbsp;&nbsp;This would mean that the textbox is already full eventhough it appears to be empty.&nbsp;&nbsp;This would explain why you can click inside of what seems to be an empty box.&nbsp;&nbsp;This would also explain why when you select part of the field it allows you to over-write.<br><br>What type of SQL Server field is the textbox based on?&nbsp;&nbsp;Does it have a default value?
 
I just figured it out.&nbsp;&nbsp;The SQL Server field was a char(255).&nbsp;&nbsp;I changed it to a varchar(255).&nbsp;&nbsp;Chars are right-padded with spaces and varchars are not.&nbsp;&nbsp;Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top