<doc>
  <legacy_id>1495</legacy_id>
  <name>revSetDatabaseDriverPath</name>
  <type>command</type>
  <syntax>
    <example>revSetDatabaseDriverPath <i>driverFolder</i></example>
  </syntax>
  <library>Database library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Database Operations</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <property tag="defaultFolder">defaultFolder Property</property>
    <function tag="revOpenDatabase">revOpenDatabase Function</function>
    <function tag="specialFolderPath">specialFolderPath Function</function>
    <function tag="revGetDatabaseDriverPath">revGetDatabaseDriverPath Function</function>
  </references>
  <history>
    <introduced version="2.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
    <disk access="???"/>
    <network/>
  </security>
  <summary>Specifies where the <glossary tag="Database library">Database library</glossary> should look for <glossary tag="database driver">database drivers</glossary>.</summary>
  <examples>
    <example>revSetDatabaseDriverPath "../drivers/"</example>
    <example>revSetDatabaseDriverPath the defaultFolder</example>
  </examples>
  <description>
    <p>Use the <b>revSetDatabaseDriverPath</b> <glossary tag="command">command</glossary> if you want to place the database drivers your application uses somewhere other than the same folder as the application.</p><p/><p><b>Parameters:</b></p><p>The <i>driverFolder</i> is the <glossary tag="file path">name and location</glossary> of the <property tag="defaultFolder">folder</property> where the <glossary tag="database driver">database driver</glossary> <function tag="files">files</function> are stored.</p><p/><p><b>Comments:</b></p><p>To use an external SQL database, the Database library needs to communicate via a database driver for the database you're using. By default, the Database library looks for drivers in the same folder as the application. If you try to work with the Database library, and the database driver is not where LiveCode expects it to be, a script error will result.</p><p/><p>If the database drivers your application needs are installed in a different folder, use the <b>revSetDatabaseDriverPath</b> <glossary tag="command">command</glossary> before you use any other <glossary tag="command">commands</glossary> or <glossary tag="function">functions</glossary> in the <glossary tag="Database library">Database library</glossary>, and before you display a <keyword tag="field">field</keyword> that you've set up to show data from a <glossary tag="database">database</glossary> (using the Database pane in the <glossary tag="field">field's</glossary> <glossary tag="property inspector">property inspector</glossary>). Usually, the best place for this <glossary tag="command">command</glossary> is in your <glossary tag="stack">stack's</glossary> <message tag="startup">startup</message> or <message tag="preOpenStack">preOpenStack</message> <glossary tag="handler">handler</glossary>.</p><p/><p><code/><img src="202653"/> <b>Important!</b><code/> The <b>revSetDatabaseDriverPath</b> <glossary tag="command">command</glossary> is part of the <glossary tag="Database library">Database library</glossary>. To ensure that the <glossary tag="command">command</glossary> 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>
  </description>
</doc>