摘要: SqlDataAdapter dataAdpater = new SqlDataAdapter( "SELECT CategoryID, CategoryName FROM Categories", connection);dataAdpater.UpdateCommand = new SqlCommand( "UPDATE Categories SET CategoryName = @CategoryName " + "WHERE CategoryID = @CategoryID" , connection);dataAdpater 阅读全文
posted @ 2011-09-16 14:58 SOD_QWER 阅读(285) 评论(0) 推荐(0)
摘要: SqlDataAdapter dataAdpater = new SqlDataAdapter( "SELECT CategoryID, CategoryName FROM Categories", connection);dataAdpater.UpdateCommand = new SqlCommand( "UPDATE Categories SET CategoryName = @CategoryName " + "WHERE CategoryID = @CategoryID" , connection);dataAdpater 阅读全文
posted @ 2011-09-16 14:58 SOD_QWER 阅读(127) 评论(0) 推荐(0)
摘要: public void imgToDB(string sql) { //参数sql中要求保存的imge变量名称为@images //调用方法如:imgToDB("update UserPhoto set Photo=@images where UserNo='" + temp + "'"); FileStream fs = File.OpenRead(t_photo.Text); byte[] imageb = new byte[fs.Length]; fs.Read(imageb, 0, imageb.Length); fs.Close 阅读全文
posted @ 2011-09-16 14:52 SOD_QWER 阅读(269) 评论(0) 推荐(0)
摘要: public void imgToDB(string sql) { //参数sql中要求保存的imge变量名称为@images //调用方法如:imgToDB("update UserPhoto set Photo=@images where UserNo='" + temp + "'"); FileStream fs = File.OpenRead(t_photo.Text); byte[] imageb = new byte[fs.Length]; fs.Read(imageb, 0, imageb.Length); fs.Close 阅读全文
posted @ 2011-09-16 14:52 SOD_QWER 阅读(190) 评论(0) 推荐(0)