How to get a column size in VB.net

  • Thread starter Thread starter Vanny
  • Start date Start date
V

Vanny

How could I get a column size from a datareader or a datatable? We're
moving from VB6 where the code looks like this: rcs.Fields(i).Size (rcs is
a recordset).

Thank for your help

Vanny
 
Thank you for the response. I tried this code : dt.Columns(i).MaxLength
where dt is a datatable. It always gives the value -1. It does not return
the field sizes for the varchar fields of the table.
Thanks,

Vanny
 
Back
Top