Visual Basic.NET
  Home arrow Visual Basic.NET arrow Page 2 - An Introduction to Object Oriented Databas...
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 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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

An Introduction to Object Oriented Database Development with VB.NET 2005
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 15
    2006-07-12

    Table of Contents:
  • An Introduction to Object Oriented Database Development with VB.NET 2005
  • Explaining the class
  • Explanation continued
  • Expanding the class to handle errors
  • Further expanding the class to handle additional rows

  • 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
     
     
    ADVERTISEMENT


    An Introduction to Object Oriented Database Development with VB.NET 2005 - Explaining the class


    (Page 2 of 5 )

    From the above code, you must be able to understand that I added a class to my solution named “Emp.”  When we speak about a class, we need to know its “members” as well.  Within the above class, we have the following “class members:”

    • m_empno
    • m_ename
    • m_sal
    • m_deptno
    • load

    Of all of the above, the first four members (m_empno, m_ename, m_sal and m_deptno) are generally termed fields/attributes/member variables/class level variables.  Since we defined all members as “public,” all of them are accessible everywhere (including within the class).  I shall explain accessibility options later in my upcoming articles. 

    There exists one more member, called “load.”  It is not a variable.  It is a sub-routine containing some logic.  Any sub-routine/function available in class is generally termed a “method.” To put it simply, the class “emp” contains five “members,” where four are the “fields” and one is the “method.”

    There can be several types of “methods” in a class. Some methods may be defined as sub-routines and others as functions.  A sub-routine doesn’t return a value, whereas a function would return something. They are also described as  “methods not returning values” (sub-routines) and “methods returning values” (functions).  Some methods may also be defined with some “parameters,” to pass some values to them.  They are generally termed “methods with parameters.”

    In our case “load” is a “method not returning a value” and also a “method accepting a parameter.”  It is mainly used to encapsulate the logic of retrieving the employee information from the database.

    More Visual Basic.NET Articles
    More By Jagadish Chaterjee


       · Hello guys. This series introduces you the OOPS in VB 2005. enjoy
       · I am unable to download the zip file.
       · The link has been corrected. Thank you for pointing out the link and we apologize...
       · Hello jagdish. i wanna to ask you, being a newbie in vb.net 2005, is this the best...
       · Hai,This series explains you the simplest way to develop OOP based db...
     

    VISUAL BASIC.NET ARTICLES

    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...
    - Creating and Drawing a Game Map in VB.NET (F...
    - Working with Classes and Properties for Game...
    - Working with Loops, Arrays, and Collections ...
    - Learning Loops in VB.NET for Game Development
    - Learning VB.NET: Working with Variables, Con...
    - The Basics of VB.NET Through Text Game Devel...
    - Learning VB.NET Through Text Game Development
    - 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 ...





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