Hi,
I have a need to find field attributes in a table, especially length of field and name. This information is needed for a common routine for printing reports from a table. I am converting ActiveX to .NET OLEDB and the current code is:
'ReDim arr(UBound(arrColumnName))
'For i = 0 To UBound(arr)
' s = rs.Fields(arrColumnName(i)).Name
' n = rs.Fields(arrColumnName(i)).DefinedSize
' If Len(s) > n Then n = Len(s)
' arr(i) = n
'Next i
rs is defined as a recordset; arrColumnName is defined as an OBJECT and contains the columns from a datagrid.
Again, the purpose of this code is to find the width of the data field.
As usual any help would be greatly appreciative.
I have a need to find field attributes in a table, especially length of field and name. This information is needed for a common routine for printing reports from a table. I am converting ActiveX to .NET OLEDB and the current code is:
'ReDim arr(UBound(arrColumnName))
'For i = 0 To UBound(arr)
' s = rs.Fields(arrColumnName(i)).Name
' n = rs.Fields(arrColumnName(i)).DefinedSize
' If Len(s) > n Then n = Len(s)
' arr(i) = n
'Next i
rs is defined as a recordset; arrColumnName is defined as an OBJECT and contains the columns from a datagrid.
Again, the purpose of this code is to find the width of the data field.
As usual any help would be greatly appreciative.