I. Summary
The preceding section briefly introduces ProC configuration and Development in Windows. This time, we use the Linux platform to configure the Oracle ProC Development Environment (RedHat Linux 9 + Oracle 92) again ). ORACLE Database development (1). Configure and use ProC in Windows and ORACLE Database Development (2). Configure and use ProC in Linux
The purpose of these two articles is only to provide some basic introduction. As for the Oracle ProC compilation parameters and the ProC Makefile content in Linux, we will introduce them later. In one word, it is easy and difficult.
Ii. database environment
Very similar to Windows, first confirm that the component is installed, Oracle-Application Development-Pro C-C ++. After installation, corresponding executable files will be generated in $ ORACLE_HOME/bin, and some makefile files and examples will be generated in $ ORACLE_HOME/precomp/demo/proc.
Iii. Example File
Main. pc
---------------------------------------------------------
# Include "sqlca. h"
# Include
# Include
# Include
Void SQL _error (char * msg)
{
Printf ("\ n % s \ n", msg, (char *) sqlca. sqlerrm. sqlerrmc );
Exec SQL ROLLBACK RELEASE;
Exit (0 );
}
Int main (){
Exec SQL INCLUDE sqlca;
Exec oracle option (RELEASE_CURSOR = YES );
Exec SQL whenever sqlerror do SQL _error (" ");
Exec SQL BEGIN DECLARE SECTION;
VARCHAR limit N [30];
Exec SQL END DECLARE SECTION;
Strcpy (Limit N. arr, "system/manager @ linuxdb ");
Limit N. len = strlen (Limit N. arr );
Limit N. arr [limit N. len] = '\ 0 ';
Exec SQL CONNECT: Limit N;
Printf ("\ n [OK Connected!] ");
Return 0;
}
The code is actually the original version of Windows.
[Content navigation] |
Page 1st: configure the Oracle ProC development environment on the Linux platform |
Page 2nd: configure the Oracle ProC development environment on the Linux platform |