<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<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>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../help+en"><img class="flag" alt="Home" border="0" src="../../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../gb.db+en">Up</a>&nbsp;
<a href="blob/length+en">Previous</a>&nbsp;
<a href="connection/begin+en">Next</a>&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+en">Open</a> method.
<p>
<div class="black"><font size="-2"><b>Symbols</b></font></div>
<div class="border">
This class is <a class="none" href="connection/_new+en">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 class="none" href="connection/charset+en">Charset</a>&nbsp;&nbsp; <a class="none" href="connection/databases+en">Databases</a>&nbsp;&nbsp; <a class="none" href="connection/host+en">Host</a>&nbsp;&nbsp; <a class="none" href="connection/login+en">Login</a>&nbsp;&nbsp; <a class="none" href="connection/name+en">Name</a>&nbsp;&nbsp; <a class="none" href="connection/opened+en">Opened</a>&nbsp;&nbsp; <a class="none" href="connection/password+en">Password</a>&nbsp;&nbsp; <a class="none" href="connection/port+en">Port</a>&nbsp;&nbsp; <a class="none" href="connection/tables+en">Tables</a>&nbsp;&nbsp; <a class="none" href="connection/type+en">Type</a>&nbsp;&nbsp; <a class="none" href="connection/user+en">User</a>&nbsp;&nbsp; <a class="none" href="connection/users+en">Users</a>&nbsp;&nbsp; <a class="none" href="connection/version+en">Version</a>&nbsp;&nbsp; </td><td>&nbsp;</td>
<td>
<a class="none" href="connection/begin+en">Begin</a>&nbsp;&nbsp; <a class="none" href="connection/close+en">Close</a>&nbsp;&nbsp; <a class="none" href="connection/commit+en">Commit</a>&nbsp;&nbsp; <a class="none" href="connection/create+en">Create</a>&nbsp;&nbsp; <a class="none" href="connection/delete+en">Delete</a>&nbsp;&nbsp; <a class="none" href="connection/edit+en">Edit</a>&nbsp;&nbsp; <a class="none" href="connection/exec+en">Exec</a>&nbsp;&nbsp; <a class="none" href="connection/find+en">Find</a>&nbsp;&nbsp; <a class="none" href="connection/limit+en">Limit</a>&nbsp;&nbsp; <a class="none" href="connection/open+en">Open</a>&nbsp;&nbsp; <a class="none" href="connection/quote+en">Quote</a>&nbsp;&nbsp; <a class="none" href="connection/rollback+en">Rollback</a>&nbsp;&nbsp; <a class="none" href="connection/subst+en">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+en">Name</a> is null, then a memory database is opened.
<li>If <a href="connection/name+en">Name</a> is an absolute path, then this path is used.
<li>If <a href="connection/name+en">Name</a> is a relative path, then:
<ul>
<li>If <a href="connection/host+en">Host</a> is null, then the database is located in the application temporary directory. See <a href="../../lang/temp+en">Temp$</a>() for more information.
<li>Otherwise, <a href="connection/host+en">Host</a> gives the database directory, and the database path is the result of concatenating <a href="connection/host+en">Host</a> and <a href="connection/name+en">Name</a>.
</ul>
</ul>

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

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

