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

  • SEARCH
  • Home
  • 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 7729539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:59:38+00:00 2026-06-01T05:59:38+00:00

So, I don’t know if the question is explicit enough, but here’s my problem:

  • 0

So, I don’t know if the question is explicit enough, but here’s my problem:

I am writing a small application in VB.Net, that retrieves information from a website and present it to the user. Basically, I have written a class, which has a Get(URL) method which retrieves the webpage, reads it and populates the various Properties (Read-only) of the object.
This class works OK.

Now, I would like to store that information in a Database (I’m using Access for now), so that I can read the data from the DB, if the class gets called for a known URL. As I’m fairly new to OOP and completely new to DB usage in desktop applications (no problems in designing the DB though), I am not sure on how to proceed:

  • Should I put the database code in my existing class?
  • Should I create an extended class based on the existing one, adding the DB code?
  • Should I create a completely different class for the DB data and put the switch logic (read from DB or from web) in my application?
  • …

I realize that my question may sound silly to the most experienced of you, but I’m new to this and I would really like to learn how to do things the right way the first time!!!

Thanks!

  • 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-01T05:59:39+00:00Added an answer on June 1, 2026 at 5:59 am

    This is what I would do:

    • Create a new class for the database code, and create an
      interface for it that it implements.
    • Then create another class that has the code to fetch the web data. Make it implement the same interface.

    Now you can subsitute either class to do your data access from your controller class.

    Also, I usually put database and data access in separate projects from my service and ui classes, which are in their own classes, but that might be overkill for your situation.

    If you’d like to read more on the subject, look up n-tier application design. The tier you’re talking about here is data access.

    http://en.wikipedia.org/wiki/Data_access_layer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't know if I worded the question right, but basically what I want to
I don't know if this question is trivial or not. But after a couple
Don't know what's wrong here, when I run the application it says Specified method
Don't know why, but sometimes LocationManager is still working also after closing application. I
Don't know if this is an eclipse specific problem but whenever I declare a
Don't know why I can't reply to people on here with only a small
Don't really know how to formulate the title, but it should be pretty obvious
Don't know how to google for such, but is there a way to query
Don't know why but font is not displaying.Please help. CSS(in css folder): style.css: @font-face
I don't know whether this is really possible, but I'm trying my best. If

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.