Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7765785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:15:01+00:00 2026-06-01T15:15:01+00:00

I have a class that has the following property that is generated by the

  • 0

I have a class that has the following property that is generated by the methods in the constructor.

Public Class clsLoadTables
    Private _ds As New DataSet
    Public Property ds() As DataSet
        Get
            Return _ds
        End Get
        Set(ByVal value As DataSet)
            _ds = value
        End Set
    End Property

    Sub New()

        Try
            loadCSVTableII()
            loadXMLFiles(pathMainTable, "MainRMDTable")
            loadXMLFiles(pathBeneLifeExp, "pathBeneLifeExp")
        Catch ex As Exception
            MessageBox.Show(ex.Message)
            Throw
        End Try

    End Sub

End Class

My problem is that I do not want to inherit this class, but I have other classes that need to access the ds DataSet property. If at all possible I would like to not use inheritance and not load my datatable more than once in the program.

Here is my failed attempt to access the property inside another class that is not inheriting clsLoadTables:

        Dim tableRow As DataRow = ds.Tables("MainRMDTable").Select(String.Format("age={0}",  age.ToString()))(0)

Any ideas on how I can access this dataset that I want to load only once in the program from many classes without using class inheritance or a global module?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:15:03+00:00Added an answer on June 1, 2026 at 3:15 pm

    You have it as a public property, so you should be able to access it if you have a reference to an instance of the clsLoadTables class.

    Dim foo As New clsLoadTables
    
    Dim tableRow As DataRow = foo.ds.Tables("MainRMDTable").Select(String.Format("age={0}",  age.ToString()))(0)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that has a decimal property accessible from multiple threads public
So I have a class that has the following member variables. I have get
I have the following setup. Class, say, Car that has a CarPart (belongsTo=[car:Car]). When
I have a class that has a property that I need to stub. I
I'm using Automapper and I have the following scenario: Class OrderModel has a property
I have an Obj-C 2.0 class that has an NSMutableArray property. If I use
I have a class that has a Generic type G In my class model
I have a class that has some properties. And I want something that calculates
I have a class that has an inner struct/class (I have decided which yet,
I have a class that has a method: -(NSInteger) getCityCountForState:(NSString *)state CityArray:(NSMutableArray *)cityArray {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.