いくつかの情報を使用してSQLデータベースに追加できる写真用のアプリがありますvarbinary
.SQLテーブルのように写真を保持しています。写真が以前に追加されたかどうかを確認したい。次のように私のコード:
byte[] img = File.ReadAllBytes(item);
//that converts the file to bytearray
string str = ByteString(img);
//ByteString is a method that converts bytearray to string (It works)
DataRow[] satirlar = das.Tables[0].Select("PicBinary=" + str);
//sql table keeps picture as varbinary in PicBinary Column
if (satirlar[0]!=null)
{
//codes
continue;
}
しかし、("column (//something unreadable) not found") のような例外が発生しdas.Tables[0].Select command
ます..何かアドバイスはありますか?