ADO.NET Sample Code
-
SQL Data Provider VB.NET Class
by
This class includes some useful methods for working with Misrosoft SQL Server in .NET simply and quickly.
-
Transactions made easy with .NET 2.0
by Xavier Larrea
One of the more significant improvement in .NET 2.0 is the transactions area. Now with a single line it becomes extremely easy to support transactional code blocks using the concept of “ambient” transaction thanks to TransactionScope in the System.Transactions namespace.
-
Database Independent ADO.NET 2.0
by Xavier Larrea
ADO.NET 2 has new classes that makes it quite easy to write data-programs independent of the database engine. Learn how here.
-
Using ASHX files to retrieve DB images
by Harry Pierson
Learn how to use the little-known Http Handler functionality of ASP.NET to serve images from a database.
-
How to run through multiple DataReader results
by Edward Tanguay
You can save code by piling SQL statements into one SqlCommand and then getting a DataReader with multiple result sets.
-
RSS Feed Helper Class
by James Crowley
A simple helper class to make generating an RSS feed a piece of cake - its the one we use on Developer Fusion too!
-
How to access a MySQL database with .NET
by Edward Tanguay
Demonstrates how to connect to a MySQL database with C#.
-
How to delete records with SqlCommand
by Edward Tanguay
This code shows you how to delete records with an SQL statement and get the number of records deleted returned back as an integer.
-
Placing results from DataReader into an Array
by Edward Tanguay
Since a connection cannot be used until a DataReader has been closed, it is quite often necessary to read the results of a DataReader into an array, then close the DataReader, then you can process the data in the array while you use the connection for something else. This shows you how.
-
How to create PDF files from ASP.NET pages
by Edward Tanguay
How to create PDF files from ASP.NET pages with Crystal Reports without using Visual Studio.NET