摘要: 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 阅读(119) 评论(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 阅读(272) 评论(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 阅读(258) 评论(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 阅读(184) 评论(0) 推荐(0)