G
Guest
I have a dotnet 1.1 app that I am redeveloping in 2.0. Part of the work
involves replacing code that executed generated SQL commands against a
database with a dataset approach.
In the original system, if text field data was longer than the field size in
the table, the data was simply truncated. This turned out to be a fine result
(sorry).
Using datasets, when I call the
myDatatable.AddMyTypedDatarow(myTypedDatarow) method, I get an
ArgumentException with the message...
"Cannot set column 'label'. The value violates the MaxLength limit of this
column."
I can't find anything in the datatable designer that would let me specify
truncation, which would be my (ugly but) preferred approach.
Alternately, is there an event or more descriptive exception I can hook or
catch so that I can do the truncation myself? I REALLY don't want to have to
check each text field manually. The field data is being loaded from a file
produced by another app that is not concerned about text length.
Thx
Marc
involves replacing code that executed generated SQL commands against a
database with a dataset approach.
In the original system, if text field data was longer than the field size in
the table, the data was simply truncated. This turned out to be a fine result
(sorry).
Using datasets, when I call the
myDatatable.AddMyTypedDatarow(myTypedDatarow) method, I get an
ArgumentException with the message...
"Cannot set column 'label'. The value violates the MaxLength limit of this
column."
I can't find anything in the datatable designer that would let me specify
truncation, which would be my (ugly but) preferred approach.
Alternately, is there an event or more descriptive exception I can hook or
catch so that I can do the truncation myself? I REALLY don't want to have to
check each text field manually. The field data is being loaded from a file
produced by another app that is not concerned about text length.
Thx
Marc