Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class Within a Class...
Message
General information
Forum:
ASP.NET
Category:
Class design
Environment versions
Environment:
VB.NET 1.1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01078713
Message ID:
01078768
Views:
12
I think that within your ClassDataSet class you need to provide a reference to SQLDBWrapper, something like this:
Private Class ClassDataSet
   Inherits DataSet
   
   Private _sqldbw As SQLDBWrapper

   Public Sub New(ByVal sqldbw As SqlDataWrapper)
      Me._sqldbw = sqldbw
   End Sub

   ' User Me._sqldbw to reference the method in the parent class, SQLDBWrapper
End Class
>Ok, here is a question that might seem a little...strange.
>
>I am attempting to create and SQL Database Wrapper Class that incorporates all the functionality we need in the application that I am developing. Inside my SQLDBWrapper class, I am creating a child class called DataSetCollection as well as ClassDataSet. (Reference the mapping below)
>
>
>          SQLDBWarpper (Custom Class)
>          |
>           ------ClassDataSet (Inherited Class: DataSet)
>          |
>           ------DataSetCollection (Inherited Class: CollectionBase)
>
>
>Inside the SQLDBWrapper I create an object called "DataSets" based on DataSetCollection. DataSetCollection has an internal collection of ClassDataSet's. Now, what I am having a problem with is that inside the ClassDataSet, I need to reference a property/variable/method of SQLDBWrapper. I can't find a Me.Parent type of connection between my classes. How can I reference the parent class from my child class?
>
>P.S. I thought about creating a property to each Child Class that housed a reference to it's parent class, but then I would have to pass that reference into the child on every "New" method call. That seems a little ridiculous since the child is already "attached" to the parent class.
>
>Help...
Chris McCandless
Red Sky Software
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform