我正在尝试从数据库加载图片到一个PictureBox
中。我使用以下代码来加载它们。虽然我已经编写了一些代码,但是我不知道接下来该做什么。
非常感谢您的帮助。
private void button1_Click(object sender, EventArgs e)
{
sql = new SqlConnection(@"Data Source=PC-PC\PC;Initial Catalog=Test;Integrated Security=True");
cmd = new SqlCommand();
cmd.Connection = sql;
cmd.CommandText = ("select Image from Entry where EntryID =@EntryID");
cmd.Parameters.AddWithValue("@EntryID", Convert.ToInt32(textBox1.Text));
}