VC Connection to Oracle Database

Source: Internet
Author: User

Busy a few days, and finally with the VC connected to the Oracle database (32-bit), although only connected to the local. There is a feeling of enlightened.

In the beginning, all kinds of not even, I put the software about Oracle completely deleted. I am not a regular uninstall, but the relevant folders are deleted. There are also registry entries. (See the end of this article)

Re-installed 11g, to the full version, not express.

pszpwd-password, pszuser-user, pszserver-data source (my is ORCL)

[CPP]View Plaincopy
  1. CString cstrsql = "PROVIDER=ORAOLEDB.ORACLE.1;  Password= ";
  2. Cstrsql + = Pszpwd;
  3. Cstrsql + = ";  User id= ";
  4. Cstrsql + = Pszuser;
  5. Cstrsql + = ";  Data source= ";
  6. Cstrsql + = Pszserver;
  7. Cstrsql + = ";  Persist Security info=true ";
  8. _bstr_t sql = Cstrsql;
  9. M_oraconn.createinstance (__uuidof (Connection)); //Create Connection object
  10. M_oraconn->open (SQL, "","", adModeUnknown); ///Connect to Database

Record it.

Completely Remove Oracle


1, Start-> Settings-> Control Panel-> Administrative Tools-> Service stop all Oracle services.  
2, Start-> Program->oracle-orahome81->oracle installation products-> Universal Installer Uninstall all Oracle products, but Universal Installer itself cannot be deleted  
5, run regedit, select Hkey_local_machine\software\oracle, and press Del to delete the entry.  
6, run regedit, select HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, scroll through this list, and delete all Oracle portals.
7, run Refedit,hkey_local_machine\system\currentcontrolset\services\eventlog \application, delete all Oracle portals.
8, Start-> Settings-> Control Panel-> System-> Advanced-> Environment Variables Delete environment variables classpath and path in the settings for Oracle  
9, from the desktop, the Startup group, the Programs menu, Remove all group and icon   for Oracle,
10, delete \program Files\oracle directory  ,
11, restart the computer, and then completely remove the Oracle directory  
12. Delete the files associated with Oracle, select the default directory where Oracle is located C:\Oracle, delete the portal directory and all subdirectories, and remove the following files Oracle.ini, oradim73 from the Windows 2000 directory (typically C:\WINNT). INI, Oradim80. INI, Oraodbc.ini, and so on.
13, WIN. INI file if there is a [Oracle] tag segment, delete the segment
14, delete all Oracle-related ODBC dsn  if necessary,
15, delete the Oracle-related logs in the Event Viewer

If there are cases where individual DLL files cannot be deleted, do not bother, restart, start a new installation,
When installing, select a new directory, then, after installation and restart, the old directory and files can be deleted.

VC Connection to Oracle Database

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: 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.