[英]value does not fall within the expected range exception for Oracle
I am using an oracle instance in c# when i am trying to run below code i am getting value does not fall within the expected range exception, adding update statement below for refrerence 我在C#中使用oracle实例时,尝试在代码下运行时,我得到的值不在预期的范围内 ,请在下面添加更新语句
db.Execute(@"UPDATE DocumentLibrary
SET ContentHierarchyId = :ContentHierarchyIdString,
IsDownloadable = :IsDownloadable,
IsPrintable = :IsPrintable,
DocumentType = :DocType
WHERE ObjectId = :ElementId",
new
{
_document.ContentHierarchyIdString,
_document.IsDownloadable,
_document.IsPrintable,
DocType = _document.DocumentType,
ElementId = _document.ObjectId.ToString()
}, transaction);
I found the fix.. As i mentioned above i am using oracle, Oracle will not take Boolean value directly, so i changed 我找到了解决方法。如上所述,我在使用oracle,Oracle不会直接采用布尔值,所以我更改了
IsDownloadable = _document.IsDownloadable ? 1 : 0,
IsPrintable = _document.IsPrintable ? 1 : 0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.