1. 程式人生 > >FileUpLoad圖片預覽、儲存圖片到資料庫

FileUpLoad圖片預覽、儲存圖片到資料庫

public partial class GetImage : System.Web.UI.Page
{
    protected OleDbConnection connection;
    protected OleDbCommand cmd;
    protected OleDbDataAdapter da;
    protected DataSet ds;
    protected void Page_Load(object sender, EventArgs e)
    {
        string id= Request.QueryString["id"];
        string sql = "select image from CmpName where cmpname='" +id +"'";
        string strConnection;
        strConnection = ConfigurationManager.ConnectionStrings["DBConnectionString"].ToString();