private void GetImage()
{
SQLiteConnection sqlite_con = new SQLiteConnection("Data Source=|DataDirectory|dbasedict.s3db;Version=3;New=False;Compress=True;");
String querry2 = "select id, word, iimages from dictionario where word = '" + searchBox.Text + "'";
SQLiteDataAdapter adap3 = new SQLiteDataAdapter(querry2, sqlite_con);
DataSet set = new DataSet();
adap3.Fill(set, "dictionario");
DataTable dataTable = new DataTable();
dataTable = (DataTable)set.Tables[0];
MemoryStream ms = null;
foreach (DataRow row in dataTable.Rows)
{
byte[ ] data = (byte[ ])row["iimages"];
ms = new MemoryStream(data);
Bitmap bmp = new Bitmap(ms);
pictureBox1.Image = bmp;
}
}
When i try this code, i ended up having an error saying: Exception is unhandled
Anyone who can help me debug this code?
I cannot use image.fromstream because i run this code in a windows mobile pocketpc 5 sdk.