Previous - dbTableNames Section Home - Database Next - dbFieldAttributes


dbTableFieldNames ( )

Obtains a list of fields (column heading) from the active connection

Usage:

dbTableFieldNames (object me, string tableName)

Parameter:

tableName (string) - the name of the table in the data file. Use dbTableNames( ) to obtain the list of tables available.

Returns:

( list of strings ) - a list of column field names for a particular table

Example:

xtRose = xtra("Rosetta").new( )
xtRose.dbOpen( "Provider=MSDASQL;ExtendedAnsiSQL=2;DRIVER={Microsoft Access Driver (*.mdb)};Dbq="&the moviepath&"main" )
put xtRose.dbTableFieldNames( "MSysAccessObjects" )

Notes:

Not all data sources will have field names. For example, csv files may not contain field names. In cases when the data source do not support retrieving field names, an empty list is returned


Previous - dbTableNames Section Home - Database Next - dbFieldAttributes