ADO - DefinedSize property
In ADO (ActiveX Data Objects), the DefinedSize property specifies the maximum size (in bytes or characters) that a Field, Parameter, or Property can hold — as defined by the database or the parameter definition.
It essentially tells you how large the data value can be, not how large it currently is.
1. Field.DefinedSize
For a Field object (in a Recordset), DefinedSize indicates the maximum defined length of the column in the database.
Example:
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "SELECT FirstName, LastName FROM Employees", conn
Dim fld As ADODB.Field
For Each fld In rs.Fields
Debug.Print fld.Name & " - " & fld.DefinedSize
Next
Output example:
FirstName - 50
LastName - 50