分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 前端开发

MVC保存数据出现:An error occurred while updating the entries. See the inner exception for details.

发布时间:2023-09-06 01:06责任编辑:白小东关键词:MVC

查看详细信息:datetime2不能插入datetime(大概意思)

其结果,查看了下,我的 class  中 并没有 datetime2,断点了下,发现是  修改时间 为空  ,结果编译运行  是 自动赋值为 默认值  0000-00-00 00:00:00,

数据库字段 也是 datetime,

那么,就直接 在 class  里面的 字段 类型 允许为空, 例如:public DateTime?  CreareDate{get;set;}  价格问号,允许为空,

这样子的话,存入数据时,时间就为空的了

感谢:http://blog.csdn.net/u010032207/article/details/53214871

http://blog.sina.com.cn/s/blog_bc5f90cd0102wufh.html

http://bbs.csdn.net/topics/392055909?page=1

MVC保存数据出现:An error occurred while updating the entries. See the inner exception for details.

原文地址:http://www.cnblogs.com/dzw159/p/7439885.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved