The entire process of solving arcengine and Oracle-related 64-bit win7 deployment problems

Source: Internet
Author: User

A business system uses the arcengine library, which uses oracle as the ACCESS database and C # As the development language. The development IDE and packaging tools are all ipvl sduio 2008.

The arcengine library is a library composed of ArcGIS for secondary development and is provided in the form of COM components.

I thought this was a relatively simple problem, but it took me about two weeks to do it. Of course, I also did a lot of other work in the past two weeks.

 

Before this problem occurs, I know that ,. net will compile the system into anycpu by default, generate intermediate language, and then generate the corresponding run according to the CPU model of the specific machine when the deployed machine runs.Code.

 

1. Install the Oracle 32-bit client on the machineProgramCompile the client to any CPU.

This solution is the first solution we tried, and the hope for it to run is not too large, but these are all ready-made and cannot run, you can also check what errors are reported. When testing the database connection, the system prompts that the system is running in 64-Bit mode, while the Oracle database is 32-bit, and the call fails (this is probably the meaning ).

In this process, we can draw the following conclusions:

(1). Oracle client 32-bit can be installed in 64-bit win7, but it is unknown whether it can run normally.

(2) If Oracle clinet will die 64-bit, the system will be very likely to run normally.

 

2. Download Oracle clinet 64-bit, install, and test. However, during the installation process, the installation fails. If the test fails, no attempt is made. There are many other ways to access Oracle, and oledb will also have an access method. This way, we can leave Oracle clinet, so there is no problem of Oracle client and system bits mismatch.

 

3. Change the connection mode related to the System Access database to oldeb, retest, or test failure. The error message is similar to the first attempt. Then you can find it on the Internet. You must install the oralce client on the machine to access oledb. I have not noticed this before.

Through this attempt, I know:

The Oracle client is required to access the Oracle database, and there does not seem to be any unnecessary solutions on the Internet. Of course, if any brother knows, read thisArticleYou must tell your younger brother later.

 

4. Discard the database connection mode, or change the Oracle clinet mode. The 64-bit installation package of Oracle clinet was successfully installed, but the database connection test was still incorrect, but the prompt information was different. I searched the internet for it, it is said that the Oracle installed on the machine may not have been uninstalled, and this problem may occur. It was a crash, and there was no way, but another win7 machine was changed, but the machine was installed with 32-bit oracle at the upper level.

 

5. to carefully understand the cause of the error, I installed the development environment on win7. First, I tested some of the simplest ones to see if there is any problem with arcengine. A built-in arcengine example is used, which indicates running and error. Now I am a little depressed. The problem of connecting to the database has not been solved yet, and the arcengine cannot even run? Now I think again, is there a 64-bit arcengine, and I usually use 32-bit arcengine? So I set the compilation option to x86 and run it successfully. It seems that this is the reason for the number of arcengine digits. Does arcengine have 64-bit data? I found it online. The answer is no. The solution provided by ESRI is also compiled using x86. In this way, I found that it is meaningless to study the 64-bit Oracle clinet, because our system can only compile into 32-bit x86.

Because our system needs to use the C ++ COM component we have written, and we need to manually register it. We have written a BAT file in the same level directory for registration, but I cannot register it now. Later I found that the full path must be used for registration in win7, and the relative path cannot be used. After the absolute path is modified, the registration is successful.

 

6. Finally, it is determined to use ORACLE clinet 32-bit, and the program is also compiled into 32-bit. Compiling in the development environment and connecting to the database again failed, and the cause of the failure was different from the previous one. After searching online, we found that the user permissions of win7 were complicated, the system must be started as an administrator. Right-click the vs shortcut and click Start as administrator to load the project. The database is successfully connected. Haha, very excited. It seems that the current problem is not 64-bit, but win7. The connection to the database, the use of the arcengine library, and the use of the COM component are successful, it seems that the situation is good. The solution is packaged, but after packaging is completed, an error occurs when you double-click the package. Suddenly remember to use the Administrator permission to run, and then go to the installation directory, right-click the main EXE, and run with the Administrator permission, but there is still a problem, too strange.

To package and deploy the. NET program, compress the files under relase and decompress the files. What should I do? I copied the debug folder to the desktop and ran it. No problem. Copy the debug folder to the same level of the installation directory to run the folder. An error occurs.

It seems to be related to the path. I also looked at the default installation path, c: \ Program Files (x86) \ company abbreviation \ product name \. Is it a question () or a space? Many tools are sensitive to characters such as spaces or () and do not support such installation paths.

 

7. Uninstall the system, install the system again, and remove the () in the installation directory. In the installation directory, run as administrator, connect to the database successfully, and start the main program successfully. It seems that the problem is indeed. Later, we found that running in compatible mode can also be successful. After running once, we can save the configuration information in compatible mode and double-click it next time.

 

So far, the entire problem has been solved.

 

Later, I want to judge when installing Windows 7. If the OS is Windows 7 and the installation directory has (), I am prompted that the installation path cannot exist under Windows 7 7 (). However, this problem has not been solved in the afternoon, and it is not the most important thing. There are many other things to be done, so there are about 10 users. Just let them know.

 

PS: at present, 64-bit win7 is still relatively small. I still don't know why I solve this problem with twists and turns, mainly because I don't know about win7 and 64-bit. However, in most cases, 64-bit machines are still used as servers and rarely used as PCs. However, many large enterprises and public institutions are already using 64-bit machines, and the configuration is superb...

 

The whole process is mainly to record the steps for me to solve this problem, and there is nothing else. For those who are familiar with win7 and 64-bit, it is a piece of cake. I am afraid of not spitting .. Haha ..

Related Article

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.