[sybase]查詢某字串是否在程式碼裡

 select object_name(id),* from syscomments 

   where texttype = 0 and 

(text like '%turnkey_date%' 

or text like '%turnkey_pick%'

or text like '%turnkey_canceldate%'

or text like '%etrndt%'

)

;

[C#][SQL]unable to cast object of type 'system.dbnull' to type 'system.string'

這個錯誤是說明

從DB搜尋的值,有包含null

困難在於,錯誤不一定會顯示位置,有2個方向查找

1. 檢查C#中,從DB來做轉換的欄位,可以設定null給空白

                string SEG6 = (string)dataRow["SEG6"];

            string SEG6NM = (string)dataRow["SEG6NM"];

2. 檢查搜尋出的值,如下圖,在依欄位找出要修改的地方,或修改where條件,不可以null




[.Net][Report]此報表的定義無效,或是這個版本的 Reporting Services 不支援該報表定義。報表定義可能是以較新版本的 Reporting Services 所建立,或是含有格式不完整或不適用於 Reporting Services 結構描述的內容。詳細資料: 報表定義具有無效的目標命名空間 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition',此命名空間無法升級。

此報表的定義無效,或是這個版本的 Reporting Services 不支援該報表定義。報表定義可能是以較新版本的 Reporting Services 所建立,或是含有格式不完整或不適用於 Reporting Services 結構描述的內容。詳細資料: 報表定義具有無效的目標命名空間 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition',此命名空間無法升級。

1. 請修改屬性目標server


2. 重建方案

3.重建後的RDL檔,會放在bin\Debug裡,用該檔上傳Server即可

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

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