Solutions to database connection problems and Chinese garbled characters in EF

Source: Internet
Author: User
Ef connection problems and Chinese garbled solutions thespecifiednamedconnectioniseithernotfoundintheconfiguration, notintendedtobeusedwiththeent1. first modify & lt; addname & quot; northwindentities & quot; & nbsp ;&

Ef connection problems and Chinese garbled Solutions


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

1. First modify

2. If the following exception occurs, the project where the program is running does not reference the connection string.

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

Generally, it is the app. config where the connection string is located. It must appear in the web. config or app. config where the execution program is located.

Chinese garbled characters

The oracle character set is gbk, And the nls_lanuage is amrican. The vs21 project is UTF-8 encoded .. When a new record is added to the database, there is no problem in both English and numbers. If it is Chinese, a message is displayed, indicating that the ora-148: The end of the str binding value is null.


It is said that it is the reason for MS oracle provider, if you use odp.net provider. But I have never tried it myself, but I just heard that.

At the time of query, when the provider is created, an option is not selected, and unicode false is changed to true, which is easy to use.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.