Name: revDatabaseColumnTypes

Synonyms: revdb_columntypes

Type: function

Syntax: revDatabaseColumnTypes(<recordSetID>)

Summary:
<return|Returns> the data types of the columns in a <record set>.

Associations: database library

Introduced: 1.1.1

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Security: disk, network

Example:
revDatabaseColumnTypes(the savedCursor of field 1)

Example:
if "BLOB" is among the items of revDatabaseColumnTypes(myCursor) then
  put true into preferQueryBlob
end if

Parameters:
recordSetID:
The number returned by the revQueryDatabase function when the record set
was created.

Returns:
The <revDatabaseColumnTypes> <function> returns a list of data types,
one for each <column> in the <record set>, separated by commas.

Description:
Use the <revDatabaseColumnTypes> <function> to find out the data type of
a <database field>.

The possible data types are:

        * BIT
        * CHAR
        * STRING
        * WSTRING
        * BLOB (short for binary large object)
        * TIMESTAMP
        * DATE
        * TIME
        * DATETIME
        * FLOAT
        * DOUBLE
        * INTEGER
        * SMALLINT
        * WORD
        * BOOLEAN
        * LONG


You can use the <revDatabaseColumnTypes> <function> to find out what
kind of data you need to be prepared for. For example, if <BLOB> is one
of the data types, that <column> is <binary file|binary data>, so you
should not attempt to display it in a <field>.

>*Important:*  The <revDatabaseColumnTypes> <function> is part of the 
> <Database library>. To ensure that the <function> works in a 
> <standalone application>, you must include this 
> <LiveCode custom library|custom library> when you create your 
> <standalone application|standalone>. In the Inclusions pane of the 
> <Standalone Application Settings> window, make sure both the 
> "Database" library checkbox and those of the database drivers you are 
> using are checked.

Changes:
The revDatabaseColumnTypes synonym was added in version 2.0.

References: function (control structure),
revDatabaseColumnNames (function), revDatabaseColumnLengths (function),
revDatabaseType (function), LiveCode custom library (glossary),
return (glossary), binary file (glossary),
record set (glossary),
Standalone Application Settings (glossary),
standalone application (glossary), column (glossary),
database field (glossary), BLOB (glossary), field (keyword),
Database library (library)

