Category Archives: database

Change a DataGridView entry when the user double-clicks a cell in C#

This post is in response to the following question: Respected Sir, I need help on how can i change the datagridview cell value by double click on that cell. Let say cell contain value ā€˜Nā€™ when i double click it … Continue reading

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

Serialize and deserialize multiple images in files in C#

The example Serialize and deserialize multiple images in C# showed how you can List<Image> into a memory stream and then deserialize stream to recover the images. This example shows how you can similarly serialize a list of images into a … Continue reading

Posted in database, files, serialization | Tagged , , , , , , , , , , , , , | 3 Comments

Serialize and deserialize multiple images in C#

This example shows how you can serialize and deserialize multiple images together in a single serialization. It also talks a bit about database design. (For more information about database design including this issue, see my book, Beginning Database Design Solutions.) … Continue reading

Posted in database, files, serialization | Tagged , , , , , , , , , , , , , | 1 Comment

Load Excel records into a DataGridView in C#

This example shows how you can load Excel records into a DataGridView control. You can use similar techniques to load Excel data into other controls such as other kinds of grid controls or a TreeView control. This example uses the … Continue reading

Posted in controls, database, Excel, interoperability | Tagged , , , , , , , , , , , , | 2 Comments

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

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 , , , , , , , , , , , , , , , , , | 5 Comments