EF调用Oracle报错:System.FormatException:“One of the identified items was in an invalid format.”


EF调用Oracle报错:System.FormatException:“One of the identified items was in an invalid format.”

错误信息:System.FormatException:“One of the identified items was in an invalid format.”

EF调用Oracle报错:System.FormatException:“One of the identified items was in an invalid format.”

原因

存储过程传参数值类型错误。如参数类型定义DATE类型,传入字符串类型如:“2021-01-11”会报错。

解决方案

将字符串转换为对应的类型。

C# 全选
p.Value = DateTime.Parse("2021-01-11");

 

其他类似错误

错误信息:System.FormatException:“2021-05--05 is not a valid value for DateTime.”

EF调用Oracle报错:System.FormatException:“One of the identified items was in an invalid format.”

 

很明显,是传入的日期字符串格式错误。

2021-05--05 改为:2021-05-05 

 

版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
C/S框架网
上一篇:OracleException:“ORA-06502: PL/SQL: 数字或值错误 : 字符串缓冲区太小
下一篇:VS2022取消显示警告,禁用Warning CA1416警告
评论列表

发表评论

评论内容
昵称:
关联文章

EF调用OracleSystem.FormatException:“One of the identified items was in an invalid format.”
FastReport.NET System.PlatformNotSupportedException:“Operation is not supported on this platform.”
The object cannot be deleted because it was not found in the ObjectStateManager
System.NotSupportedException:“The entity or complex type 'CSFramework.EF.tb_MyUser' cannot be constructed in a LINQ to Entities query.”
FastReport.NET打开设计器:EntnyPointNotFoundException,:Unable to find an entry point named 'setWindowTheme' inDLL 'user32'.
Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the s
打开设计窗体:To prevent possible data loss before loading the designer
EF异步查询The provider for the source 'IQueryable' doesn't implement 'IAsyncQueryProvider'
.NETCore使用EF保存图片:OracleExceptiol: ORA-01460:转换请求无法实施或不合理
No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'
EF问题:The model backing the 'GenericDbContext' context has changed since the database was created.
JsonDataConnection.CreateAllTables方法DataSet does not support System.Nullable<>
PL/SQL Developer连接Oracle数据库:ORA-12541:TNS:无监听程序
The Database principal owns a schema in the database
EF:从 datetime2 数据类型到 datetime 数据类型的转换产生一个超出范围的值
EF.Core:provider: Session Provider, error: 19 - Physical connection is not usable
EFCore:OracleException: ORA-01465: 无效的十六进制数字
FastReport:TfrxReportClass cold not be found!
LINQ+EF:Cannot use multiple context instances within a single query execution. Ensure the query uses a single context instance.
调用WebApi接口POST操作失败Unable to connect to the remote server

热门标签
.NET5 .NET6 .NET7 .NET8 .NETFramework APP Auth-软件授权注册系统 Axios B/S B/S开发框架 Bug Bug记录 C#加密解密 C#源码 C/S CHATGPT CMS系统 CodeGenerator CSFramework.DB CSFramework.EF CSFrameworkV1学习版 CSFrameworkV2标准版 CSFrameworkV3高级版 CSFrameworkV4企业版 CSFrameworkV5旗舰版 CSFrameworkV6.0 CSFrameworkV6.1 DAL数据访问层 Database datalock DbFramework Demo教学 Demo实例 Demo下载 DevExpress教程 DOM EFCore EF框架 Element-UI EntityFramework ERP ES6 Excel FastReport GIT HR IDatabase IIS JavaScript LINQ MES MiniFramework MIS NavBarControl Node.JS NPM OMS Oracle资料 ORM PaaS POS Promise API Redis SAP SEO SQL SQLConnector TMS系统 Token令牌 VS2022 VSCode VUE WCF WebApi WebApi NETCore WebApi框架 WEB开发框架 Windows服务 Winform 开发框架 Winform 开发平台 WinFramework Workflow工作流 Workflow流程引擎 XtraReport 版本区别 报表 踩坑日记 操作手册 代码生成器 迭代开发记录 功能介绍 国际化 基础资料窗体 架构设计 角色权限 开发sce 开发技巧 开发教程 开发框架 开发平台 开发指南 客户案例 快速搭站系统 快速开发平台 框架升级 毛衫行业ERP 秘钥 密钥 权限设计 软件报价 软件测试报告 软件简介 软件开发框架 软件开发平台 软件开发文档 软件体系架构 软件下载 软著证书 三层架构 设计模式 生成代码 实用小技巧 收钱音箱 数据锁 数据同步 微信小程序 未解决问题 文档下载 喜鹊ERP 喜鹊软件 系统对接 详细设计说明书 新功能 行政区域数据库 需求分析 疑难杂症 蝇量级框架 蝇量框架 用户管理 用户开发手册 用户控件 在线支付 纸箱ERP 智能语音收款机 自定义窗体 自定义组件 自动升级程序