Changes to MaxLength being ignored

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

I have a dataset with data retrieved from an Access2K database and I am
trying to change the MaxLength property of one of the text fields. The code
executes fine (e.g. myDataset.Tables(0).Columns(x).MaxLength = 50), but the
value of MaxLength doesn't change! Can anyone explain why this is happening
and how I can change the MaxLength property?

- Don
 
My problem is not that the MaxLength property doesn't contain the actual
maximum length of the field as defined in the database. My problem is that
once I've retrieved a dataset with this information, I cannot change the
value of it.

Hi Don,

If you create a strongly typed DataSet, the DataColumn.MaxLength property is not set.

You can refer to the following link to know more about it and to resolve it.
[BUG: DataColumn.MaxLength Property Is Not Set for Strongly Typed DataSets]
http://support.microsoft.com/default.aspx?scid=KB;EN-US;317175

HTH

Mona

I have a dataset with data retrieved from an Access2K database and I am
trying to change the MaxLength property of one of the text fields. The code
executes fine (e.g. myDataset.Tables(0).Columns(x).MaxLength = 50), but the
value of MaxLength doesn't change! Can anyone explain why this is happening
and how I can change the MaxLength property?
 
Back
Top