ef mysql 中文乱码_EF之数据库连接问题与中文乱码解决方法

ef之连接问题与中文乱码解决方法

the specified named connection is either not found in the configuration, not intended to be used with the ent

1.首先修改

2.若是出现以下异常则说明执行程序所在的项目没有引用到该连接字符串

the specified named connection is either not found in the configuration, not intended to be used with the entityclient provider, not valid.

一般是连接字符串所在的app.config的问题,他必须出现在执行程序所在的那个web.config 或者是 app.config

关于中文乱码

oracle字符集 gbk ,nls_lanuage为amrican。vs21项目编码utf-8。。现在是对数据库进行新增记录时,英文和数字都没有问题。如果是中文 会提示ora-148: str 绑定值的结尾 null 字符缺失。

据说是 ms oracle provider 的原因,如果用 odp.net provider 就行了。但是我没有亲自试过,只是听说。

在查时发现在创建provider的时候有一个选项没选 、unicode false改为true 就好用了

f68f2add0b68e4f9810432fce46917b7.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值