Click here to Skip to main content
15,879,326 members
Articles / Programming Languages / Visual Basic

Object-Oriented database design with the DatabaseObjects library

Rate me:
Please Sign up or sign in to vote.
4.00/5 (6 votes)
31 Jan 20076 min read 109.3K   3.9K   64  
Demonstrates creating object-oriented database systems with the DatabaseObjects library.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><!-- InstanceBegin template="/Templates/function.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 -->
<link href="default.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1>

<h1><!-- InstanceBeginEditable name="heading" -->DatabaseObjects<!-- InstanceEndEditable --></h1>
<h3><!-- InstanceBeginEditable name="subheader" -->ObjectsCollection(<span class="keyword">ByVal</span> objCollection
    <span class="keyword">As</span> IDatabaseObjects) <span class="keyword">As</span> Collection<!-- InstanceEndEditable --><br>
</h3>
</h1>

<!-- InstanceBeginEditable name="text" -->
<p>ObjectsCollection returns a Collection object containing all of the collection's
  associated child objects. This function is useful when loading a set of objects
  for a subset or for creating a <span class="keyword">For
  Each</span> enumerator.</p>
<!-- InstanceEndEditable --><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">'Products class</span><span class="keyword">

</span><span class="comment">'Create a<font face="Courier New, Courier, mono"> For Each </font></span><span class="keyword">

Public Function</span> <font face="Courier New, Courier, mono">Enumerator</font>() <span class="keyword">As</span> IUnknown
<span class="comment">'1. Select Tools &gt; Procedure Attributes
'2. Select <font face="Courier New, Courier, mono">Enumerator</font> in the Name list
'3. Click Advanced
'4. Enter -4 <font face="Courier New, Courier, mono">in</font> the 'Procedure ID'</span>

    <span class="keyword">Static</span> colProducts <span class="keyword">As</span> Collection<br>
    <span class="keyword">Set</span> colProducts = dbo.ObjectsCollection(Me)<br>    <span class="keyword">Set</span> Enumerator = colProducts.[_NewEnum]<br>
<span class="keyword">End Function</span><!-- InstanceEndEditable --></pre></td>
  </tr>
</table>
</font>

<p>&nbsp;</p>
<p align="center"><font size="1">�  Hi Integrity Systems 2005. All rights reserved.</font></p>
</body>

<!-- InstanceEnd --></html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions