I'm writing a user interface in VB.NET for users to enter information into a Microsoft SQL Server database. When a user enters say, a machine name into a textbox I want the textbox to accept no more characters than can be entered in that field in the database. What statement do I use to retrieve the length for that column so I can set the textboxes maxLength at runtime. Thanks a lot.