Pro*C (a.k.a Pro*C/C++) is an embedded SQL pre-processor used by Oracle Database database management systems.
Questions tagged [oracle-pro-c]
169 questions
13
votes
2 answers
Oracle Pro*C/OCI install handlers for SIGSEGV/SIGABRT and friends - why, and how to disable?
When using Pro*C (a embedded SQL preprocessor from Oracle for C-Code) or OCI I noticed that the connect/init routine installs some signal handlers.
That means before a
EXEC SQL CONNECT :username IDENTIFIED BY :password USING :dbspec ;
or…

maxschlepzig
- 35,645
- 14
- 145
- 182
9
votes
4 answers
Rebuild precompiled header
I am trying to use MFC with ProC.
Functions.pc is where I do the ProC syntax to connect to the database. So I include the 'Functions.h' in the dialog model where I want to call the functions in 'Funtions.h'. And now I got this error.
Add…

Azuan
- 878
- 2
- 13
- 33
9
votes
8 answers
ORACLE 10.2 Pro*C precompiler not reading header file
I'm pre-compiling a C program containing Pro*C code with Oracle 10.2 and AIX 5.2
The Oracle precompiler reads the $ORACLE_HOME/precomp/admin/pcscfg.cfg file which contains the definition of the sys_include variable (set to /usr/include).
The Pro*C…

David
- 14,047
- 24
- 80
- 101
9
votes
1 answer
SQL query in Pro-C fails with Error:02115
I am getting some weird behavior of Pro-C procedure as shown below:
#define BGHCPY_TO_ORA(dest, source) \
{ \
(void)strcpy((void*)(dest).arr, (void*)(source)); \
(dest).len = strlen((const char *)(dest).arr); \
}
#define BGHCPY_FROM_ORA(dest,…

Saurabh Verma
- 91
- 4
6
votes
2 answers
Where does this declaration come from: main _2a((argc,argv), int argc, char * argv[])
I am migrating lots of Oracle Pro*C Code under HP-Unix to a Linux Environment.
In a program there is only such a main method defined:
main _2a((argc,argv), int argc, char * argv[])
{
...
}
I have never seen such a decalaration before - and haven't…

Stefan
- 2,603
- 2
- 33
- 62
5
votes
3 answers
5
votes
4 answers
SQL: Preparation of SQL query fails. But is executed when done manually
I am getting an error which can be seen below when I am preparing the query:
SQL-ERR:Preparation of INSERT Query Failed: Ora-Err: -1756 ORA-01756:
quoted string not properly terminated
The query is as follows:
EXEC SQL declare INSDTA…

NJMR
- 1,886
- 1
- 27
- 46
4
votes
1 answer
Is there a more intelligent sql-preprocessor for Oracle than Pro*C/C++?
Does someone know if there is pre-processor for C/C++ in conjunction with Oracle that would allow me to write C or C++ code similar to:
void populateTableList(GuiList* tableList) {
for users in ( select table_name,
…

René Nyffenegger
- 39,402
- 33
- 158
- 293
4
votes
2 answers
Pro*C passing array of parameters
I am trying to write Pro*C/C/C++ code to handle a query like this:
SELECT col1, col2, col3, col4 FROM table WHERE param IN();
I can have a C struct to retrieve the result and pass individual parameters but I can't seem to find a way…

Karlson
- 2,958
- 1
- 21
- 48
4
votes
1 answer
Oracle beq and popen()
I have a program like this (that's for Pro*C precompiler):
#include
#include
#include
#include
EXEC SQL BEGIN DECLARE SECTION;
static VARCHAR ora_connect_str[81];
EXEC SQL END DECLARE SECTION;
EXEC SQL…
user332325
4
votes
1 answer
PCC-S-02015, "unable to open include file"
I am trying to compile a C++ program on UNIX using CC: Sun C++ 5.11 SunOS_i386. I created the following Makefile.
ORACLE_HOME=/app/ora/local/product/11.2.0.3/db_1
CC= CC -m64 -library=iostream
test.cpp : test.pc
$(ORACLE_HOME)/bin/proc test.pc…

NJMR
- 1,886
- 1
- 27
- 46
4
votes
1 answer
How to compile additional source files in cmake after the build process
I have a project in cmake for windows which contains a Pro*C source file called database.proc, my goal is to generate a C source file from the .proc file and add it to the project to be linked along the other source files, I've tried to add a custom…

user2005494
- 189
- 1
- 12
4
votes
2 answers
SQLCA.SQLERRD Host array in Pro*C
As we know in numerous of the documentations it is mentioned that the 3rd element of the Host array SQLCA.SQLERRD i.e. sqlca.sqlerrd[2] contains the cumulative number of rows processed by the SQL statement so far (in terms of Pro*C).
Does someone…

Anjan Biswas
- 7,746
- 5
- 47
- 77
3
votes
1 answer
Get OCCI Connection from Pro*C connection?
We maintain an extensive collection of components written in C++ that run under Linux, Solaris, AIX and HP/UX that connect to an Oracle database using Pro*C. I am about to write a component that performs a lot of dynamic SQL and would like to…

trojanfoe
- 120,358
- 21
- 212
- 242
3
votes
1 answer
Connecting to different database versions
I maintain a set of applications that use Pro*C to connect to Oracle 10g databases. These applications are generally involved with moving data from one database to another. In each case a connection is made to the source database and a separate…

Paul Coombes
- 145
- 1
- 10