SQL Sample Code
-
Health Monitoring in ASP.NET 2
by
This is a code sample for using health monitoring...
-
SQL Data Provider VB.NET Class
by
This class includes some useful methods for working with Misrosoft SQL Server in .NET simply and quickly.
-
Bulk Insert from Flat File Using Transact-SQL
by M M Harinath
Importing Data from Text File using Transact-SQL is not a tough task, we can import data from Flat File in just 3 steps.
-
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.
-
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.
-
Randomly Sorting Records
by James Crowley
Here's now to randomly sort records in SQL Server 2000 - so you can potentially select say 10 random items from a table.
-
Calculate Diskspace Used by a Table or Database
by James Crowley
This short snippet shows how to discover how large a particular table or an entire database is in SQL Server.
-
Resizing images retrieved from SQL server
by Simon Soanes
A neat way of fetching an image stored in SQL Server and resizing it before save/sending it anywhere.
-
Debug ASP.NET pages using Tracing
by Julian Roberts
Demonstrates a useful debugging technique taking advantage of traces in ASP.NET.
-
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#.
-
Databinding SqlTypes
by Dan Glass
Demonstrates how Databind the SqlTypes using the PropertyDescriptor class and the ITypedList Interface.
-
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.
-
ADO Utility Class
by NeverMalchik
ADO class containing useful functions - counting records, creating database from scratch, openning/closing database, filling listbox/combo box with an sql statements, manipulating records....and much more.
-
"On Error Resume Next" considered harmful
by Palo Mraz
Discusses some unexpected implications of using the 'On Error Resume Next' statement in Visual Basic applications.
-
Get metadata on MySQL databases
by Edward Tanguay
An example of how to get metadata - such as all the databases on the server, all of their tables, and the corresponding field information for that table.
-
ASP.NET Graphical Page Hit Counter
by Raam Kumar
Generate graphics on the fly to provide a graphical page hit counter, storing the counter in a text file or SQL database.
-
ActiveX Data Object Simple Routines
by Macky M
These groups of Procedures will allow you to Open Databases, Run SQL Statements, as Well as Execute Stored Procedures without hassle...
-
Display SQL Server table data in a browser
by Edward Tanguay
Just supply your database connection string and this code will give you a radio button list of all your SQL Server tables and will show their fields.