Tag Archives: database

Use a password protected Access database in C#

This example shows how you can open and use a password protected Access database in C#. It also shows how you can use the database’s password protection to provide a login form for your program. Note that the security used … Continue reading

Posted in database, Office | Tagged , , , , , , , , , | Leave a comment

Write a CSV file from an array in C#

The example Read a CSV file into an array in C# shows how to load a CSV file into a two-dimensional array of strings. This example does the opposite: it saves a two-dimensional array of strings into a CSV (comma-separated … Continue reading

Posted in database, files, strings | Tagged , , , , , , , , , , , , , , | Leave a comment

Display database pictures in a ListView control in C#

This example shows how you can display database pictures in a ListView control. My previous post, Create ListView icons at run time in C#, explained how to make images at runtime to display in a ListView control. This example follows … Continue reading

Posted in controls, user interface | Tagged , , , , , , , , , , , , , , , , , , , | 10 Comments

Update a DataTable that is bound to a DataGridView in C#

The example Build a DataTable and bind it to a DataGridView in C# shows how you can bind a DataTable to a DataGridView to display data. This example shows how you can add new data to the display. When the … Continue reading

Posted in controls, database | Tagged , , , , , , , , , , , | Leave a comment

Save several images into Access in C#

The example Save images in an Access database in C# includes an Access database. Unfortunately if you save several images into the database and then open the database in Access, Access removes the images. It just doesn’t seem to understand … Continue reading

Posted in database, graphics, image processing, Office | Tagged , , , , , , , , , , , , , , , , , , | 1 Comment

Load images from an Access database in C#

The post Save images in an Access database in C# explains how to save images in an Access database. This post explains how to load images from an Access display them. Like previous examples, this program uses a SQL statement … Continue reading

Posted in database, graphics, image processing, Office | Tagged , , , , , , , , , , , , , , , , , | 2 Comments

Save images in an Access database in C#

This example shows how you can save images in an Access database. The example Use filenames stored in a database to display images in C# shows how to display images by saving the image file names in a database and … Continue reading

Posted in database, graphics, image processing, Office | Tagged , , , , , , , , , , , , , , , , , | 4 Comments

Use filenames stored in a database to display images in C#

The reason so many people ask how to store and retrieve images in a database is that it’s hard. You need to use a special data type such as the BLOB (Binary Large Object) or MEMO data type depending on … Continue reading

Posted in database, graphics, image processing, user interface | Tagged , , , , , , , , , , , , , , | 2 Comments

Display database records without data binding in C#

Many programs use data binding to display database records. That method is easy (at least as far as the code you write is concerned), but it’s not very flexible. This example shows how you can display database records without data … Continue reading

Posted in controls, database, lists, user interface | Tagged , , , , , , , , , , , , , | 1 Comment

Initialize lists from databases without binding in C#

Note that this is a very manual way to initialize lists. Often you can display data more easily by using data binding. In this example, I added the Access database file Books.mdb to the project and set its “Copy to … Continue reading

Posted in controls, database, lists, user interface | Tagged , , , , , , , , , , , , | 1 Comment