0
private void button1_Click(object sender, EventArgs e)
{
SqlConnection cn = new SqlConnection(@"Data Source=SAZ-PC\SQLEXPRESS;Initial Catalog=Voted;Integrated Security=True");
SqlCommand cmd1 = new SqlCommand("select FINGERPRINT from Regdmem ", cn);
cn.Open();
Byte[] barrImg = (Byte[])cmd1.ExecuteScalar();
foreach (byte fp in barrImg)
{
Byte[] bytes = File.ReadAllBytes("D:\\Image.bmp");
bool cmp = barrImg.SequenceEqual(bytes);
if (cmp == true)
{
Form3 f3 = new Form3();
f3.Show();
this.Hide();
}
else
{
Application.Exit();
}
}
cn.Close();
}
데이터베이스에 FINGERPRINT
이라는 열이있는 테이블이 있습니다. 이 열에는 여러 개의 이미지가 저장됩니다.내 데이터베이스에서 특정 이미지를 찾으려면 어떻게합니까?
나는 또한 내 harddrive (D:\\Image.bmp
)에 이미지가 있습니다.
제 질문은이 이미지가 내 데이터베이스에 이미 저장되어 있는지 확인하고, 그렇다면 내 응용 프로그램의 다음 양식으로 이동하십시오.
고맙습니다 그것은 노력뿐만 아니라 내가 application.exit을 주석 응용 프로그램()는 작업 잘 – Legend
이 BL을 따라 다름을 종료. –