Visual Basic.NET
  Home arrow Visual Basic.NET arrow Page 3 - Implementing OOP to Develop Database Orien...
Iron Speed
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Implementing OOP to Develop Database Oriented Applications using VB.NET 2005
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 24
    2007-01-22

    Table of Contents:
  • Implementing OOP to Develop Database Oriented Applications using VB.NET 2005
  • Developing a class which holds an entire row in a table
  • Developing a class which holds a set of rows belonging to the same table
  • Developing a factory class to update rows to the database
  • Developing a class to interact with databases
  • Developing the application

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Implementing OOP to Develop Database Oriented Applications using VB.NET 2005 - Developing a class which holds a set of rows belonging to the same table
    (Page 3 of 6 )

    In the previous section, we saw a class which can store a whole row of information. If we have multiple rows to handle, we need to store them in the form of a collection. The following is the class that can hold multiple objects belonging to the same type:

    ImportsSystem.Collections

    PublicClass Employees

        Inherits CollectionBase

        Public Sub add(ByVal e As Employee)

            List.Add(e)

        End Sub

        Public Sub delete(ByVal e As Employee)

            List.Remove(e)

        End Sub

        Public Sub delete(ByVal index As Integer)

            If index < 0 Or index > List.Count - 1 Then

                Throw New Exception("Invalid index to remove")

            End If

            List.RemoveAt(index)

        End Sub

        Default Public Overridable ReadOnly Property Item(ByVal index As Integer) As Employee

            Get

                Return CType(Me.List(index), Employee)

            End Get

        End Property

        Public ReadOnly Property Search(ByVal Empno As Integer) As Employee

            Get

                For Each e As Employee In Me.List

                    If e.Empno = Empno Then Return e

                Next

                Return Nothing

            End Get

        End Property

    EndClass

    More Visual Basic.NET Articles
    More By Jagadish Chaterjee


       · This is a simple introduction to developer OOP based database applications using...
       · Excellent article. Jag is a great teacher.keep up the good work
     

    VISUAL BASIC.NET ARTICLES

    - Types of Operators in Visual Basic
    - Operators
    - Understanding Custom Events using Visual Bas...
    - Polymorphism using Abstract Classes in Visua...
    - Shadowing using Shadows in Visual Basic.NET ...
    - Overloading and Overriding in Visual Basic.N...
    - More on Controlling Windows Fax Services Usi...
    - Programmatically Controlling Windows Fax Ser...
    - Focusing on Forms and Menus in Visual Basic
    - Manipulating Forms with the Windows Forms Li...
    - Basics of the Windows Forms Library
    - Forms, Controls, and Other Useful Objects
    - Implementing OOP to Develop Database Oriente...
    - Using Themes and Skins for Personalization w...
    - A Deeper Look at Personalization using Visua...

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway