Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Please Help


Message #1 by "Ian Hill" <ian.n.hill@l...> on Wed, 13 Sep 2000 01:01:28 +0100
This is the Problem:

In Chapter 10 of Visual Basic 6 Objects, by Peter Wright, an example is
given on creating two objects:

clsSupplier in the Business Tier, which implements the following code (pg.
320),
Public Function FindByID(lngID As Long) As Boolean
Dim dbsSupplierData As New clsDBSupplier
FindByID = dbsSupplierData.Find_Supplier(lngID, Me)
?
End Function

,AND

clsDBSupplier in the Data Tier which implements the following code (pg.
307),
Public Function Find_Supplier(ByVal lngID As Long, _
supBusinessObject As clsSupplier) As Boolean
?
End Function

basically, clsSupplier calls a function in clsDBSupplier and passes
?itself? as an argument.

This works fine in one project, however I can?t seem to separate these
classes into two separate .DLL?s to implement a scalable architecture
which I thought was one of the points of building tiers.
The problem is one of circular references.  I can?t make the .DLL
clsDBSupplier because it doesn?t know the clsSupplier passed into it, and
I can?t make the .DLL clsSupplier (to then make clsDBSupplier) because it
doesn?t know clsDBSupplier!

Any help would be greatly appreciated since I have spent a lot of time
designing something using the very same methods above.
 

  Return to Index