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
- CString cstrsql = "PROVIDER=ORAOLEDB.ORACLE.1; Password= ";
- Cstrsql + = Pszpwd;
- Cstrsql + = "; User id= ";
- Cstrsql + = Pszuser;
- Cstrsql + = "; Data source= ";
- Cstrsql + = Pszserver;
- Cstrsql + = "; Persist Security info=true ";
- _bstr_t sql = Cstrsql;
- M_oraconn.createinstance (__uuidof (Connection)); //Create Connection object
- M_oraconn->open (SQL, "","", adModeUnknown); ///Connect to Database
Record it.
Completely Remove Oracle
Reference: http://blog.csdn.net/tanzugan/article/details/7556770
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
Description
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