Retrieve image from database
Managed Providers are a collection of classes in the .NET Framework that provide a foundation for the ADO.NET programming model. A data type is an attribute that specifies the type of data that the object can hold: integer data, character data, date and time data, image data and so on.
Conversion of image data type to another data type is not supported, implicitly or explicitly. However, indirect conversion of image data can be performed.
Dim image As Byte() = DirectCast(command.ExecuteScalar(), Byte())
The following VB.NET source code shows how to retrieve an image from SQL Server.
- What is ADO.NET Dataset
- How to Dataset with Sql Server
- How to Dataset with OLEDB Data Source
- Search Tables in a Dataset Sql Server
- Search Tables in a Dataset OLEDB Data Source
- Dataset table row count in SQL Server
- Dataset table row count - OLEDB Data Source
- How to find column definition - Sql Server
- How to find column definition - OLEDB Data Source
- How to create DataSet without Databse
- How to multiple tables in Dataset - Sql Server
- How to multiple tables in Dataset - OLEDB Data Source
- How to add relations between tables in a Dataset
- How to merge tables in a Dataset - Sql Server
- How to merge tables in a Dataset - OLEDB Data Source
- How to populate a combo box from a dataset in VB.Net , binding combobox with enum values , binding combobox with dictionary values
- how many tables exist in a database - VB.NET