<doc>
  <legacy_id>1642</legacy_id>
  <name>revDatabaseColumnNumbered</name>
  <type>function</type>
  <syntax>
    <example>revDatabaseColumnNumbered(<i>recordSetID</i>,<i>columnNumber</i>[,<i>variable</i>])</example>
  </syntax>
  <library>Database library</library>
  <objects>
  </objects>
  <synonyms>
    <synonym>revdb_columnbynumber</synonym>
  </synonyms>
  <classification>
    <category>Database Operations</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <command tag="revMoveToNextRecord">revMoveToNextRecord Command</command>
    <function tag="revCurrentRecord">revCurrentRecord Function</function>
    <function tag="revDatabaseColumnNamed">revDatabaseColumnNamed Function</function>
    <function tag="revDatabaseColumnCount">revDatabaseColumnCount Function</function>
    <function tag="revDatabaseColumnIsNull">revDatabaseColumnIsNull Function</function>
    <command tag="revMoveToFirstRecord">revMoveToFirstRecord Command</command>
    <command tag="revMoveToLastRecord">revMoveToLastRecord Command</command>
    <function tag="revDatabaseColumnLengths">revDatabaseColumnLengths Function</function>
  </references>
  <history>
    <introduced version="1.1">Added.</introduced>
    <changed version="2.9"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
    <disk access="???"/>
    <network/>
  </security>
  <summary><glossary tag="return">Returns</glossary> data from a specified <glossary tag="database field">database field</glossary>.</summary>
  <examples>
    <example>revDatabaseColumnNumbered(customerServiceDB, 3)</example>
    <example>revDatabaseColumnNumbered(7, 3, "tNewColumn") <i>-- puts column 3 into tNewColumn</i></example>
    <example>revDatabaseColumnNumbered(USCustomers, x, "tFoundZipCodes")</example>
    <example>revDatabaseColumnNumbered(tCursor, 1, "tRetrievedDataArray[id]")</example>
  </examples>
  <description>
    <p>Use the <b>revDatabaseColumnNumbered</b> <control_st tag="function">function</control_st> to obtain the contents of a given <glossary tag="database field">database field</glossary>, in the current <glossary tag="record">record</glossary> of the specified <glossary tag="record set (database cursor)">record set (database cursor)</glossary>.</p><p/><p><b>Parameters:</b></p><p>The <i>recordSetID</i> is the number returned by the <function tag="revQueryDatabase">revQueryDatabase</function> when the <glossary tag="record set (database cursor)">record set</glossary> was created.</p><p/><p>The <i>columnNumber</i> is the number of a <glossary tag="database field">database field</glossary>.</p><p/><p>The <i>holderVariable</i> is any valid <glossary tag="variable">variable</glossary> name or the name of an array element.</p><p/><p><b>Value:</b></p><p>The <b>revDatabaseColumnNumbered</b> <control_st tag="function">function</control_st> returns or text data from the specified field of the current <glossary tag="record">record</glossary>, if no <i>holderVariable</i> is specified. If a <i>holderVariable</i> is specified, then the function returns empty.</p><p/><p><b>Comments:</b></p><p>If you specify a <i>holderVariable</i>, the data is placed in that <glossary tag="variable">variable</glossary>. Otherwise, the data is <glossary tag="return">returned</glossary> by the <control_st tag="function">function</control_st>. In order to retrieve binary data, a holder variable must be specified, otherwise the <b>revDatabaseColumnNumbered</b> function may return truncated data. This is due to limitations in the current architecture.</p><p/><p>If the attempt to get the data is not successful, the <b>revDatabaseColumnNumbered</b> <control_st tag="function">function</control_st> returns an error message that begins with the <keyword tag="string">string</keyword> "revdberr".</p><p/><p><img src="202653"/> <b>Important!</b> The <b>revDatabaseColumnNumbered</b> <control_st tag="function">function</control_st> is part of the <glossary tag="Database library">Database library</glossary>. To ensure that the <control_st tag="function">function</control_st> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section of the General screen of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure the "Database Support" checkbox is checked and the database drivers you are using are selected in the list of database drivers.</p><p/><p><b>Changes:</b></p><p>The ability to specify an array element as a holder variable was added in version 2.9.</p><p>The <b>revDatabaseColumnNumbered</b> synonym was added in version 2.0.</p>
  </description>
</doc>