ASP.NET
  Home arrow ASP.NET arrow Developing a Data Access Layer for Sybase ...
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 
Mobile Linux 
App Generation ROI 
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? 
ASP.NET

Developing a Data Access Layer for Sybase Using ADO.NET: Essentials
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 8
    2006-03-20

    Table of Contents:
  • Developing a Data Access Layer for Sybase Using ADO.NET: Essentials
  • Configuring Sybase for data access using ADO.NET
  • The Constructor in the Data Access Layer
  • Getting a table (or data table) of information from Sybase database using ADO.NET
  • Getting a single value from Sybase database using ADO.NET

  • 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


    Developing a Data Access Layer for Sybase Using ADO.NET: Essentials


    (Page 1 of 5 )

    This article mainly focuses on developing a simple DAL (Data Access Layer) for any database using ADO.NET. There exist several types of DAL for Microsoft SQL Server on the Internet (but not much about native Sybase connectivity). In this article, we consider Sybase as the database of choice for developing the DAL.
    A downloadable file for this article is available here.

    I enclosed the source code in the form of a single file (“.vb” file).  You can use it right away or extend it further based on your needs.  The entire discussion in this article will be based on version .NET 1.1.

    Contents of the Data Access Layer

    The primary job of a Data Access Layer (DAL) is to communicate seamlessly and effectively with the database by minimizing the resources at the server.  This is possible only when we separate our business logic layer with the DAL and make the DAL available to a greater number of business logic layers (or even applications).

    Considering this from the ADO.NET point of view, to retrieve some information from a database, we generally use some frequent objects such as connection, command, data reader, data adapter, and so on.  Just imagine that we would like to bind four drop down lists (at various points in time).  We cannot simply open different connections at all the levels, issue several commands and work with many ADO.NET objects every time!

    We need to make the data access very simple, reusable, extensible, logable, maintainable, and deployable with several other features.  This article doesn’t cover all of the features mentioned, but I tried to make it as simple as possible so that you can further extend it to suit your own needs.

    The DAL that we are going to develop now mainly contains the following frequently used routines:

    BindDropDownList
    BindListBox
    getDataRow
    getDataSet
    getDataTable
    getDataView

    Those were the routines I used very frequently to retrieve information from any database.  I didn’t add any “data manipulations” (like executing an SQL statement) for this DAL yet.  But you can add it according to your needs.

    Now, let us jump into some of the core issues of native Sybase data access using ADO.NET.

    More ASP.NET Articles
    More By Jagadish Chaterjee


       · Hello guys. In this article, I am introducing you to develop your own datahelper (or...
     

    ASP.NET ARTICLES

    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ





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