<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css">
<title>
Gambas Documentation - Connection
 (gb.db)</title>
</head>
<body>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../help%3Fen"><img class="flag" alt="Home" border="0" src="../../../img/lang/en.png" align="center"></a>&nbsp;&nbsp;
<a href="../gb.db%3Fen">Up</a>&nbsp;&nbsp;
<a href="blob/length%3Fen">Previous</a>&nbsp;&nbsp;
<a href="connection/begin%3Fen">Next</a>&nbsp;&nbsp;
</td></tr></table>
<div class="notab">
<h1>
Connection
 (gb.db)</h1>
This class represents a connection to a database.
<p>
To connect to a database, create a connection object, fill the needed properties, and call the <a href="connection/open%3Fen">Open</a> method.
<p>
<div class="black"><font color="white" size="-2"><b>Symbols</b></font></div>
<div class="border">
This class is <a href="connection/_new%3Fen">creatable</a>.<br>
<hr><table class="none" cellspacing="0" cellpadding="0">
<tr>
<td align=left><b>Properties</b></td><td width="32">&nbsp;</td>
<td align=left><b>Methods</b></td><td width="32">&nbsp;</td>
</tr>
<tr valign=top>
<td>
<a href="connection/charset%3Fen">Charset</a>&nbsp;&nbsp; <a href="connection/databases%3Fen">Databases</a>&nbsp;&nbsp; <a href="connection/host%3Fen">Host</a>&nbsp;&nbsp; <a href="connection/login%3Fen">Login</a>&nbsp;&nbsp; <a href="connection/name%3Fen">Name</a>&nbsp;&nbsp; <a href="connection/opened%3Fen">Opened</a>&nbsp;&nbsp; <a href="connection/password%3Fen">Password</a>&nbsp;&nbsp; <a href="connection/port%3Fen">Port</a>&nbsp;&nbsp; <a href="connection/tables%3Fen">Tables</a>&nbsp;&nbsp; <a href="connection/type%3Fen">Type</a>&nbsp;&nbsp; <a href="connection/user%3Fen">User</a>&nbsp;&nbsp; <a href="connection/users%3Fen">Users</a>&nbsp;&nbsp; <a href="connection/version%3Fen">Version</a>&nbsp;&nbsp; </td><td>&nbsp;</td>
<td>
<a href="connection/begin%3Fen">Begin</a>&nbsp;&nbsp; <a href="connection/close%3Fen">Close</a>&nbsp;&nbsp; <a href="connection/commit%3Fen">Commit</a>&nbsp;&nbsp; <a href="connection/create%3Fen">Create</a>&nbsp;&nbsp; <a href="connection/delete%3Fen">Delete</a>&nbsp;&nbsp; <a href="connection/edit%3Fen">Edit</a>&nbsp;&nbsp; <a href="connection/exec%3Fen">Exec</a>&nbsp;&nbsp; <a href="connection/find%3Fen">Find</a>&nbsp;&nbsp; <a href="connection/limit%3Fen">Limit</a>&nbsp;&nbsp; <a href="connection/open%3Fen">Open</a>&nbsp;&nbsp; <a href="connection/quote%3Fen">Quote</a>&nbsp;&nbsp; <a href="connection/rollback%3Fen">Rollback</a>&nbsp;&nbsp; <a href="connection/subst%3Fen">Subst</a>&nbsp;&nbsp; </td><td>&nbsp;</td>
</tr>
</table>
</div><p>

<div class="warning"><table class="none" border="0"><tr><td width="40" valign="top"><img border="0" src="../../../img/info.png" align="center"></td><td valign="top">
For SQLite connections, the following algorithm is used:
<p>
<ul>
<li>If <a href="connection/name%3Fen">Name</a> is null, then a memory database is opened.
<li>If <a href="connection/name%3Fen">Name</a> is an absolute path, then this path is used.
<li>If <a href="connection/name%3Fen">Name</a> is a relative path, then:
<ul>
<li>If <a href="connection/host%3Fen">Host</a> is null, then the database is located in the application temporary directory. See <a href="../../lang/temp%3Fen">Temp$</a>() for more information.
<li>Otherwise, <a href="connection/host%3Fen">Host</a> gives the database directory, and the database path is the result of concatenating <a href="connection/host%3Fen">Host</a> and <a href="connection/name%3Fen">Name</a>.
</ul>
</ul>

</td></tr></table></div>

</div>
<hr>
</body>
</html>

