I am not familiar with oracle, and I have only done one job for. net and oracle development projects. Recently I changed my computer, installed a 64-bit win7 system, and installed a bunch of software.
I am going to list some questions that have been difficult for a long time for future students.
The company uses oracle10g and vs2010, all of which are 32-bit.
1) oracle10g cannot be directly installed in 64-bit win7. Solution: Right-click the installation and startup exe file and choose "compatibility"> select "run this program with compatibility" --> select "winxp, you can install it after saving it.
2) in the previous 32-bit winxpsystem, the connection string was like this: <add name = "SQLMembershipConnString2" connectionString = "Data Source = ORCL; User Id = system; Password = 123456; "providerName =" Oracle. dataAccess. client "/>
After changing to the current 64-bit Windows 7, it has been unable to run. After one day, I realized that it was a connection string problem. The error message is that the oracle client version is not high enough. No matter how the connection string is changed, the error message is the same. Baidu has found many articles about the reason for insufficient permissions (not sure whether this is the cause ), after the change, I still had the same problem. It took me a day !!, Later, I downloaded the odp.net Component of oracle. All the 32-bit 64-bit tossing errors were prompted, and searching online based on the error prompt could not be solved. Think that the framework class is compatible with odp.net. Later, he carefully read the description of odp.net. He planned to connect to the remote server and tried to use <add name = "SQLMembershipConnString3" connectionString ="Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.253.11) (PORT = 1521) (CONNECT_DATA = (SID = HZDB ))); user Id = test; Password = 123456 ;"ProviderName = "Oracle. dataAccess. client "/> This string is not connected for a long time because of a large number of changes. Just when I want to give up going home and reinstalling the 32-bit system, the error message "table or view not found" is displayed on the page! Then we found the root cause of the problem: the connection string is incorrect. After testing, we found that another method is also possible: <add name = "SQLMembershipConnString" connectionString = "Data Source =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.253.128) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
); User Id = test; Password = 123456;
"ProviderName =" Oracle. DataAccess. Client "/>
Because the odp.net component was changed in the meantime, it took a lot of time because of various incomprehension and detours. There are also many people on the Internet who have encountered this problem, but no one has found this answer.
Alas... Microsoft does not want to update System. data. the OracleClient component is no longer needed. If the connection fails, there is only one error message: the oracle client version is not high enough, so I hope to give a reference to the students who have been beaten by others, IT is not easy.
Supplement: after more than a month, I found some problems. I accidentally found the above System when I looked for information today. data. the reason why OracleClient cannot connect to oracle is that there is a solution. By the way, correct the preceding error. window7 defaults to System. data. oracleClient cannot connect to oracle. You need to change the environment variable path of the computer system and change the default oracle path to the client path that can be normally accessed (for example, my path: D: \ oracle \ product \ 11.2.0 \ client_1 ). The reason is System. data. when accessing the oracle database, OracleClient searches for oci Based on the PATH. dll, if oci. if the dll version does not support 64.net, it will fail and cannot connect to the database. Instead, it will be able to connect to the database through a client that can be used.