[SQL]產生SQLAgent排程LIST

 SELECT

    -- job.job_id,

    -- notify_level_email,

     name,

-- Right('00000000' + Cast(steps.last_run_time as varchar),6) as time,--hhmmss

left(substring('000000',1,6-len(next_run_time))+Convert(nchar,next_run_time),2)+':'+substring(substring('000000',1,6-len(next_run_time))+Convert(nchar,next_run_time),3,2)+':'+right(next_run_time,2) as RUNTIME,


     enabled,

     description,

     step_name,

     command,

     server,

     database_name

FROM

    msdb.dbo.sysjobs job

INNER JOIN 

    msdb.dbo.sysjobsteps steps ON job.job_id = steps.job_id

left join  msdb.dbo.sysjobschedules as s on job.job_id = s.job_id 

WHERE

    job.enabled = 1 -- remove this if you wish to return all jobs

order by next_run_time asc

[RedAjax]UpdatePanelRenderMode in RedControl

         this.Master.AjaxManager.AjaxSettings.AddAjaxSetting(P_Edit, P_GridMulti, null, UpdatePanelRenderMode.Inline);

        this.Master.AjaxManager.AjaxSettings.AddAjaxSetting(P_Edit, P_GridList, null, UpdatePanelRenderMode.Inline);

        RadAjaxLoadingPanel loading = (RadAjaxLoadingPanel)this.Master.AjaxManager.FindControl("RadAjaxLoadingPanel1");

        this.Master.AjaxManager.AjaxSettings.AddAjaxSetting(P_GridMulti, P_GridMulti, loading, UpdatePanelRenderMode.Inline);


來源參考:

https://docs.telerik.com/devtools/aspnet-ajax/controls/ajaxmanager/how-to/radajax-and-webusercontrols

        

[SQL]UPDATE 產生流水號

 

DECLARE @MAX_ACCOLFID INT

SELECT @MAX_ACCOLFID = MAX(ACCOLFID)  FROM COIF_1

--以上流水號可承接別的TABLE

UPDATE COIF_2

SET @MAX_ACCOLFID = @MAX_ACCOLFID + 1,

     ACCOLFID = @MAX_ACCOLFID

[DataSet Bug]無法啟用條件約束。一或多個資料列的值違反非 Null、唯一或外部索引鍵條件約束

在使用TableAdapter作Query時發生 1. 原因為有些資料欄位Query出來後為null值 但是該欄位在dbDataSet的屬性AllowDBNull為False 因此把該欄位(或乾脆把全部欄位屬性AllowDBNull改為True 2. maxLength 檢...