I need to read an image file from a blob column in MySql database into a byte array that can be used as an image source in a WinForm. I do not know the size of the blob.
int id = 1;
IDbCommand dbcmd = dbconn.CreateCommand();
string sql =
"SELECT image_file " +
"FROM current_session " +
"WHERE id = " + Id;
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
At this point the reader should have the data.
How do I get that data to the rawData array?
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs. This Article is intended to be a resource for such a task.
The other day, I was involved …
This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html). It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database.
Open Services Panel:
Create a new connection using New Connection Wizard:
Create a test database called eetutorial:
Create a new test tabel called ee…