ADO.NET: Read and Write images from a Database

This application shows you how to read and write images to a database.

Featured Highlights:

This application uses a TabControl to separate the three main user interface
areas. The Setup tab enables you to create a new table in the Northwind database
to store images. The Save tab provides controls to browse for and view an image
file, and then save it as a binary image datatype to the database. Lastly, the
Manage tab allows you to view and delete images stored in the database.

ADO .NET is used throughout to interact with MSDE or SQL Server.

Requirements:

Requires the release version of Visual Studio .NET Professional (or greater)
and access to the Northwind database residing in SQL Server or the Microsoft
Data Engine (MSDE). To install MSDE, do the following:

1. Open the Start menu, then click Programs, the click Microsoft .NET Framework
SDK, and then click Samples and Quickstart Tutorials.

2. Click "Step 1: Install the .NET Framework Samples Database".

3. Open a command window, and CD to <FrameworkSDK>\Samples\Setup
This is typically :
C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Samples\Setup

4. Type: osql -E -S (local)\NetSDK -i InstNwnd.sql
 

Running the Sample:

Simply Press F5.

See also

ADO.NET  ADO to ADO.NET