精選文章

bcp大量匯出與匯入資料庫資料方法

--匯出-- bcp "select * from [資料庫名稱].[dbo].[資料表名稱]" queryout 匯出檔案名稱.txt -w -U "使用者帳號" -P "使用者密碼" " "...

2018年12月13日 星期四

更新URL但不刷新頁面

問題:
"更新URL但不刷新頁面"
說明:
pushState() 的基本參數是:
window.history.pushState(state, title, url);

解決方法:
方法
"window.history.pushState(null, null, "/profile/");"

2018年12月12日 星期三

當匯出的excel格式為3.705E+11格式時

問題:
"當匯出的excel格式為3.705E+11,調整可顯示完整"

解決方法:
方法
    
buttons: [
       {extend: 'excelHtml5',
        filename: 'my_file_name',
        title: null,
        exportOptions: {
            format: {
                     body: function (data, row, column, node ) {
                                return column === 2 ? "\0" + data : data;
                                }
              }
           }
      }
]

2018年12月7日 星期五

如何取得 web.config 裡的 httpRuntime 資訊

問題:
如何取得 web.config 裡的 httpRuntime 資訊
說明:
maxRequestLength設定上傳檔案大小(單位是KB)
解決方法:
HttpRuntimeSection section = (HttpRuntimeSection)ConfigurationManager.GetSection("system.web/httpRuntime");

2018年12月3日 星期一

SQL Update Join

說明:
"SQL Update Join" 方法:
UPDATE Table_A
SET Table_A 欄位 = 值
From Table_A a
Left Join Table_B b on a.欄位 =b.欄位
WHERE 條件