PROPERTY: Field::DefinedSize

long = fieldobject.DefinedSize
 
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.
 
Code (VBScript):
Set rsData = Server.CreateObject("ADODB.Recordset")
rsData.Open "GuruList", strConnection, , , adCmdTable
rsData.MoveFirst
Do While Not rsData.EOF
   Response.Write "Actual Size = " & rsData(strFieldName).ActualSize & VBCRLF
   Response.Write "Defined Size = " & rsData(strFieldName).DefinedSize & VBCRLF
   rsData.MoveNext
Loop

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information