Visual Basic.NET
  Home arrow Visual Basic.NET arrow Implementing OOP to Develop Database Orien...
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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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 / 25
    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
     
     
    ADVERTISEMENT


    Implementing OOP to Develop Database Oriented Applications using VB.NET 2005


    (Page 1 of 6 )

    This article explains how to implement object oriented programming to develop database oriented applications using VB.NET 2005. I took the simplest approach to develop this application.
    A downloadable zip file is available for this article.

    I am dividing this tutorial into two parts.  Part one, which is this article, contains the full source code for developing the application.  Part two will contain the full explanation for the source code.

    I have already contributed several articles on developing Data Access Layers, Object Oriented Database Development, implementing COM+, working with Enterprise Application Blocks, Windows Services, and so forth on this web site.  If you are new to any of those, I suggest you go through my articles at http://www.aspfree.com/cp/bio/Jagadish-Chatarji.

    In this article, I thought I would concentrate on OOP rather than data access.  Since I have already contributed several articles covering best practices with data access, I don’t want to cover all of them again here. The source code that I developed for this tutorial is purposely made simple. Please note that there are  better, even excellent, ways to handle databases from within your application.

    Setting up the environment for this contribution

    Before we begin, create a new Windows forms application, add an “app.config” file and modify the same in such a way that it looks something like the following:

    < <?xml version="1.0" encoding="utf-8"?>

    <configuration>

        <system.diagnostics>

          .

          .

          .

          .

        </system.diagnostics>

          <connectionStrings>

                <add name="SampleDB" connectionString="Data Source=.;initial catalog=sample;user id=sa"/>

          </connectionStrings>

    </configuration>

    Since I wanted to demonstrate stored procedures which do not handle existing data in AdventureWorks, I created a table “emp” in a database called “sample,” with the following columns and data types:

    • Empno (int)
    • Ename (nvarchar(50))
    • Sal (float)
    • Deptno (int)

    I pushed the following sample rows into that table:

    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

    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - 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...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek