發表文章

目前顯示的是 8月, 2018的文章

local / global temporary table

暫存表分為本地(Local)和全域(Global) ps: session指sql server management的一個查詢視窗 區別: 1.表名 本地為#temptable,一個# 全域為##temptable,兩個# 2.session間存取 本地只能被 創建他的 session存取 全域能被當前任意session存取 3.不同session創建暫存表 本地在兩個session可以創建同一暫存表名稱 (因為同樣的暫存表名,會被sql server加上一個隨機數字來區別出來) 全域在多個session中不能創建同名 不管是全域或本地都是在創造他session關閉時,就被刪除。

本地暫存表/預存程序

預存程序的本地暫存表,本地暫存表會在預存程序結束之後刪除。 //***創造預存程序**// create procedure spzoetemp as begin create table #zoetesttemp(Id int,name nvarchar(3)); insert into #zoetesttemp Values(1,'Zoe') select * from #zoetesttemp end //**執行預存程序**/ execute spzoetemp //**選擇佔存表 不能 因為這個表在預存程序執行結束後就消失!**// select * from #zoetesttemp 訊息 208,層級 16,狀態 0,行 13 Invalid object name '#zoetesttemp'.

SAP Connector for Microsoft .NET 3.0-------Cannot convert String into DATE/TIME

SAP Connector for Microsoft .NET 3.0 下載位址 https://support.sap.com/en/product/connectors/msnet.html 請根據.net版本以及CPU來選擇安裝版本,否則會有問題 下載的ZIP把他解壓,之後安裝,安裝完成後,到安裝路徑把DLL搬到你的程式下參考 ________________________________________________________________ 另外若是3.0.15.0之前,會發生Time欄位超過24:00,報錯的問題(如下所述) 請更新到3.0.15.0和之後版本,並在程式中加入此句 GeneralConfiguration.AnyDateTimeValueAllowed = true; 根據SAP官方文件的敘述: (https://apps.support.sap.com/sap/support/knowledge/preview/en/2396680) According to SAP Note 856863 - SAP NCo Release and Support Strategy, NCo 2.0 has ended its support thus please use NCo 3.0 in custom program. Since NCo 3.0.15, it offer new feature to disable the validation. Please check Note 2095394 - SAP .NET Connector Version 3.0.15 last paragraph for detail. Or you can get same information from page 37 of NCo_30_ProgrammingGuide.pdf which can be downloaded from https://service.sap.com/connectors -> SAP Connector for Microsoft .NET