Archive | Data Access RSS feed for this section

Creating a Custom ADO.NET DataAdapter

By David Talbot Abstract Visual Studio.NET’s code generation features serve the purpose of creating trivial applications very well but when it comes time to create a more complicated application, a good programmer needs to know how to work with ADO.NET DataAdapters at the code level. When should I write my own vs. have one generated? Reasons [...]

Read more

In-Depth ASP.NET using ADO.NET

In this article we will discuss a number ofways to retrieve, show, and update data with ASP.NET forms usingADO.NET. Also, we will have a clear idea about the most common servercontrols in ASP.NET. In particular, with this article we will coverASP.NET server controls, ADO.NET DataSource, and creating TemplatedDataBound Controls, ASP.NET forms, using data with controls. [...]

Read more

ODBC usage in .NET

This article will provide a template of how torepresent a smallint, integer, decimal, varchar and other ODBC datatypes that are used in the SQL Server environment in COBOL. The use of relational database systems isnothing new to COBOL. For years developers have utilized DB/2 on theIBM Mainframes as well as Oracle. On the Microsoft platforms, [...]

Read more

Storing Data using C#

As we said before that computer programs work on data so we need to know how we can store data and how we can use this data in our program?s code to do our tasks. To understand how we can store and manipulate data in C# let?s take an example of storing 2 integer numbers [...]

Read more

Xml TreeView

The application shown here was my firstadventure into Xml in the .Net platform. My goal was to be able toreflect any Xml file into the Windows Forms TreeView control. I foundvarious examples online, but none I found were suited for opening allXml files, rather they were suited to one schema or another. The problem I [...]

Read more

Data Access Layer based on DataSets

Introduction This article aims to introduce the reader to several conceptualproblems encountered in the development of a generic Data Access Layer(from now on referred to as DAL). It addresses itself both to beginnersand advanced practitioners of the art and it is hoped that everybodywill find something useful in the text that follows. Context The approach [...]

Read more

Mapping XML to SQL Statments

By Damjan Kovac In this article I’m trying to explain one of the method how to build appropriate SQL statement from XML string (document) which represents records in specific DBMS datatable. XSD schemas are not used – reading metadata from DBMS table is used instead. The basic algorithm is: 1. Generate appropriate XML string representing datarows [...]

Read more

Transaction and Exception Handling in ASP.NET

By Eric Zheng With SQL-Transaction class and Exceptions Handling provided by .NET Framework, we can deal with database operations and catch system exceptions in a very reliable way. This little article will explain the basic concept and usage of Transactions and Exceptions Handling. What is Transaction? A transaction is a sequence of operations performed as a [...]

Read more

Dynamically setting properties of a class from a Database

In this short example I will demonstrate apowerful feature of Reflection that will allow you to dynamically setthe values of a class. By setting the properties of a classdynamically, you can create a simple method that allows your class tobe constructed and pre-populated from a database. We will use an Employee class, and a stored [...]

Read more

ADO.NET, COBOL and Stored Procedures

Overview In a previous article we began exploring how ADO.NET and NetCOBOL for .NET could be used to access data in a database. We defined the process for connecting to the database, establishing a command and finally accessing and displaying the data. In this article we will access a Stored Procedure to perform a specific [...]

Read more