0
バイナリロングデータとして保存されているアクセスデータベースからイメージを取得しようとしています。私は他のデータと一緒にdatagridviewに画像を表示したい。アクセスデータベースからイメージ(ロングバイナリデータ)を取得し、C#でグリッドビューに表示します。
String sql = "SELECT Config.ConfigID, Config.ProductName, Config.Features, Config.Price, Config.Picture, Stock.Quantity, Stock.TotalPrice FROM Config INNER JOIN Stock ON Config.ConfigID = Stock.ConfigID";
cmd = new OleDbCommand(sql, con);
rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
dataGridView1.Rows.Clear();
try
{
while (rdr.Read() == true)
{
dataGridView1.Rows.Add(rdr[0], rdr[1], rdr[2], rdr[3], rdr[4], rdr[5], rdr[6]);
}
con.Close();
}
は弟を働いていない、私はそれと追加画像添付ファイルをご参照ください。 –
何が問題なのですか? 'GetBytes'または' Bitmap.FromFile'? –
いいえ、その言う、DestFilePathは既に別のプログラムで使用中です。 –