ADO » Field » DefinedSize

long = fieldobject.DefinedSize

Returns a long value that is the defined (maximum possible) size (data capacity) of a Field object.

The DefinedSize property returns a long value that is the defined or maximum size in bytes of a Field object. Size can also be referred to as data capacity.
The DefinedSize property has read/write permission when being used to create recordsets, but converts to read-only when you open an already created recordset.
The companion ActualSize property sets or returns a long value that is the actual length of a Field object value. In other words, DefinedSize defines how long a value can be, while ActualSize telling how long it really is.


Set rsData = Server.CreateObject("ADODB.Recordset")
rsData.Open "GuruList", strConnection, , , adCmdTable
Do While Not rsData.EOF
   Response.Write "Actual Size = " & rsData(strFieldName).ActualSize & VBCRLF
   Response.Write "Defined Size = " & rsData(strFieldName).DefinedSize & VBCRLF

See Also: