Configure the Oracle ProC Development Environment on Linux

Source: Internet
Author: User

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.

  • 1
  • 2
  • Next Page
[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

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.