<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><!-- InstanceBegin template="/templates/interface.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Database Objects</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --><!-- InstanceParam name="remarks2" type="boolean" value="false" -->
<link href="default.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>
<h1><!-- InstanceBeginEditable name="heading" -->IDatabaseObjects<!-- InstanceEndEditable --></h1>
<h3><!-- InstanceBeginEditable name="subheader" --> IDatabaseObjects_TableJoins(<span class="keyword">ByVal
</span>objPrimaryTable<span class="keyword"> As </span>SQLSelectTable<span class="keyword">, </span><span class="keyword">ByVal</span> objTables <span class="keyword">As</span> SQLSelectTables) <span class="keyword">As</span> SQLSelectTableJoins<!-- InstanceEndEditable --><br>
</h3>
</h1>
<!-- InstanceBeginEditable name="text" -->
<p> This function should
return an SQLSelectTableJoins object containing the table or tables to be
joined to the primary table. This function is useful in optimising database
loading speeds by allowing multiple tables to be joined into one recordset.
The resultant recordset can then be used to load
objects from the associated tables avoiding subsequent
SQL calls. For a complete example, see the
demonstration program. Implementing
this function is optional.</p>
<!-- InstanceEndEditable -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#EAEBFF"><font size="-1">This interface function/property is
utilised by the following functions:<br>
<b><!-- InstanceBeginEditable name="utilisedby" -->
Object, ObjectItem, ObjectByKey, ObjectByOrdinal, ObjectByOrdinalFirst, ObjectsSearch,
ObjectsCollection<!-- InstanceEndEditable --></b></font></td>
</tr>
</table><br>
<font face="Courier New, Courier, mono">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#f6f6f6"><pre><!-- InstanceBeginEditable name="example" --><span class="comment"><font face="Courier New, Courier, mono">'J</font>oin the primary table to the Suppliers<font face="Courier New, Courier, mono"> </font>table, joining the primary table's SupplierID with the Supplier table's SupplierID.</span><span class="keyword"><font face="Courier New, Courier, mono">
</font>
Private Function</span> IDatabaseObjects_TableJoins(<span class="keyword">By<font face="Courier New, Courier, mono">Val</font></span><font face="Courier New, Courier, mono"> objPrimaryTable <span class="keyword">As</span> SQLSelectTable, </font><span class="keyword">ByVal</span> objTables <span class="keyword">As</span> SQLSelectTables) <span class="keyword">As</span> Dbo.SQLSelectTableJoins
<span class="keyword">Dim</span> objTableJoins <span class="keyword">As</span> SQLSelectTableJoins
<span class="keyword">Set</span> objTableJoins = <span class="keyword">New</span> SQLSelectTableJoins
<span class="comment">'objPrimaryTable<font face="Courier New, Courier, mono"> is the table </font>specified <font face="Courier New, Courier, mono">in</font> the IDatabaseObjects_TableName function</span>
<span class="keyword">With</span> objTableJoins.Add(objPrimaryTable, dboInnerJoin, objTables.Add("Suppliers"))
.Where.Add "SupplierID", dboComparisonEqualTo, "SupplierID"
<span class="keyword">End With</span>
<span class="keyword">Set</span> IDatabaseObjects_TableJoins = objTableJoins
<span class="keyword">End Function</span>
<!-- InstanceEndEditable --></pre></td>
</tr>
</table>
</font>
<p></p>
<!-- InstanceBeginEditable name="remarks" -->
<p> </p>
<!-- InstanceEndEditable -->
<p> </p>
<p align="center"><font size="1">� Hi Integrity Systems 2005. All rights reserved.</font></p>
</body>
<!-- InstanceEnd --></html>