I have a 2 column grid populated from a query. The grid is
editable and will be submitted to an action page for database
Delete, Insert, or Update. The first grid column corresponds to a
MS SQL database column that is defined as varchar(3).
Currently, if the user inputs 4 characters and submits, I get
a SQL trunc error.
There has to be a way to limit the number of characters in
this cfgridcolumn to 3? How is it done?
Well, you could check the number of characters on your action
page, and bounce them back if it exceeds the maximum number, and
you can "protect" the database by including a limiting function on
the data in the insert statement, like LEFT(col, 3) so that
regardless what they specify, you will only insert the first 3 into
the database. You really should let them know if they entered too