|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><!-- InstanceBegin template="/templates/main.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>
<!-- InstanceBeginEditable name="header" -->IGlobalDatabaseObjects interface<!-- InstanceEndEditable --></h1>
<!-- InstanceBeginEditable name="body" -->
<p>The IGlobalDatabaseObjects interface aids in maintaining a class library's
abstraction layer when external objects (objects outside of the
class library) need to be used. For example, if we had two DLL class
libraries, the first an Inventory class library that exposes, amongst other
classes a collection of Product objects and the second library
needs to use the Product objects provided by the Inventory library. In
particular, it needs
to be able to store and load a Product using it's distinct value (ProductID).
So rather than exposing a
public
function in the Inventory library to load a Product using it's distinct
value (ProductID) the Products class can implement the IGlobalDatabaseObjects
interface. Implementing this interface allows a product to be loaded from
it's distinct value without exposing a public function - thereby maintaining
a degree of abstraction between the two dlls.
Conversely, the product's distinct value (ProductID) can be extracted by calling
DBO.ObjectDistinctValue.</p>
<p>This interface provides a model for maintaining an abstraction between two
seperate class libraries. For an example, see <a href="GlobalDatabase_GlobalObject.htm">GlobalObject</a>, <a href="IGlobalDatabaseObjects_Object.htm">IGlobalDatabaseObjects_Object</a> or
the Products class in the NorthwindDB demonstration program.</p>
<p><a href="IGlobalDatabaseObjects_Object.htm">Object</a>(<span class="keyword">ByVal</span> vDistinctValue <span class="keyword">As Variant</span>) <span class="keyword">As</span> <a href="IDatabaseObject.htm">IDatabaseObject</a></p>
<!-- InstanceEndEditable -->
<p> </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.
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
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.