创建一个BtnShow按钮,然后添加以下代码:
private void BtnShow_Click(object sender, System.EventArgs e)
{
SqlConnection conn=new SqlConnection(ConnectString);
string strSql="SELECT Photo from Picture where StudentID="1:;
SqlCommand cmd=new SqlCommand(strSql,conn);