04 GetTypes - AndrewMB2/Logic-Architect-for-Excel-VBA GitHub Wiki

GetTypes method

Returns the set of field data types.

Applies to

TableData ArrData RsetData Xdata XShared

Returns the set of field data types as a string of VbVartype constants, separated by commas. This can be run with debug.print to provide a list of types which can be used when creating an ArrData or RsetData object which requires the list of field data types to be provided as the second parameter.

Attempts to determine the data type by looking at the first row below the header row, but returns "unknown" if the data type cannot be determined. Also, since Excel allows mixed types in columns, the data type returned may not be representative of all the data. So the results should be checked and amended if necessary before use in a Create statement.