Error getting tags :
error 404Error getting tags :
error 404 revDatabaseColumnNames | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
revDatabaseColumnNames
Basics
Expander triangle
Type
Function
Syntax

revDatabaseColumnNames(recordSetOrConnectionId [, tableName ])

Introduced
1.1
Changed
2.9
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
Disk,Network
Summary
Returns the list of database field names in a record set (database cursor) or a database table
Examples

revDatabaseColumnNames(foundResults)
get revDatabaseColumnNames(field "Current Results")
get revDatabaseColumnNames(tConnectionId, "myTable")

Additional Comments
Expander triangle

Use the revDatabaseColumnNames function to find out what database fields are in the record set returned by a SQL query or what database fields are contained within a certain table.

Parameters:

The recordSetOrConnectionId is either the number returned by the revQueryDatabase when the record set was created or the number returned by the revOpenDatabase function when the connection was created.

The tableName is the name of a table in the current database. A table name should be specified if the recordSetOrConnectionId parameter is a connection id.

Value:

The revDatabaseColumnNames function returns a list of database field names, separated by commas.

Comments:

There are two forms of the revDatabaseColumnNames function. It can either be used to return the list of column names in a record set, or as of version 2.9, the list of columns in a given table.

To get the list of columns in a record set use a form like this:

get revDatabaseColumnNames(tRecordSetId)

To get the list of columns in a given table, use a form like this:

get revDatabaseColumnNames(tConnectionId, "myTable")

If the operation is not successful, the revDatabaseColumnNames function returns an error message that begins with the string "revdberr".

Important! The revDatabaseColumnNamesfunction is part of the Database library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions section of the General screen of the Standalone Application Settings window, make sure the "Database Support" checkbox is checked and the database drivers you are using are selected in the list of database drivers.

Changes to Revolution:

The ability to obtain the list of fields for a table without obtaining a record set first was added in version 2.9

The revDatabaseColumnNames synonym was added in version 2.0.

User Comments
Expander triangle