Precompilers, OCI & OCCI :: PCC-F-02102 / Fatal Error While Doing C Preprocessing
Dec 22, 2009
I am getting following errors while compiling pro*c program
ystem default option values taken from: /data/OraHome/MidHome/precomp/admin/pcscfg.cfg
Syntax error at line 342, column 1, file /usr/include/ncurses/curses.h:
Error at line 342, column 1 in file /usr/include/ncurses/curses.h
* bool _notimeout; /* no time out on function-key entry? */
1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:
} char, const, double, enum, float, int, long, ulong_varchar,
OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDateTime,
OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
OCIRaw, OCIString, short, signed, sql_context, sql_cursor,
struct, union, unsigned, utext, uvarchar, varchar, void,
volatile, a typedef name,
Error at line 0, column 0 in file ao030cm.pc
PCC-F-02102, Fatal error while doing C preprocessing
i am getting below error when i compiler a pro*c program with Oracle 10g client with IBM C compiler version 9.0 on AIX 6.1
Syntax error at line 183, column 2, file /usr/include/sys/socket.h: .... PCC-S-02201, Encountered the symbol "sa_family_t" when expecting one of the foll owing: ....
EXEC SQL BEGIN DECLARE SECTION char dbLanguageId[SMSDUN_LANGID_LEN + 1]; EXEC SQL END DECLARE SECTION
-- other statements
EXEC SQL EXECUTE BEGIN SELECT LANGUAGE_ID -- Length of this column is 10 INTO :dbLanguageId FROM CUSTOMERATTRIBUTES
[code]...
While executing the above command, it is giving error as "ORA-01480: trailing null missing from STR bind value". Its working in some oracle versions but not in other. where exactly the problem is.
We are porting our application from HP-UX to Sun Solaris and as part of that I am trying the compile a Pro*C program in Sun Solaris using SUNWspro C++ compiler. Precompiling is failing with following error.
System default option values taken from: /u01/app/oracle/product/10.2.0/precomp/admin/pcscfg.cfg
Syntax error at line 44, column 30, file /u01/app/SUNWspro/prod/include/CC/stlport4/algorithm: Error at line 44, column 30 in file /u01/app/SUNWspro/prod/include/CC/stlport4/a lgorithm # include _STLP_NATIVE_HEADER(algorithm) .............................1 PCC-S-02014, Encountered the symbol "(" when expecting one of the following:
[code]...
Normal C++ files are getting compiled with out eny issues. This particular file is having functions written in C fashion.
Above query runs perfectly on SQL prompt.Same query, when being run in a Pro*C program gives compilation error-:
Error at specified line:
,( SELECT D.V3 FROM TABLE2 D WHERE D.V3 = C.V4) .............................1 PCC-S-02201, Encountered the symbol "D" when expecting one of the following: ( ) * + - / . @ | at, day, hour, minute, month, second, year,
What are the possbile causes of error. I am using Oracle 10g on Unix.
I have 3 code files written in ProC. I have precompiled, compiled, tested them in my local environment (Windows) & they work fine. But when I try in real environment, AIX 5.3, I can precompile them. But when I try to compile & link them with the libclntsh library I get errors. I am using a Makefile but just for testing this is the command -
xlc oraProcs oraProcs.c test_curva.c lib_util.c -I $ORACLE_HOME/precomp/public -L $LIBPATH -l libclntsh.a Error - ld: 0706-006 Cannot find or open library file: -l libclntsh.a ld: open(): A file or directory in the pathname does not exist
where LIBPATH = $ORACLE_HOME/lib
library libclntsh.a exists in $ORACLE_HOME/lib & has the right permissions
I also tried removing the library libclntsh.a & recreating it using the command - genclntsh When I run this command I get this warning more than once -ld: 0711-783 Warning TOC overflow TOC size: 66888 Max size: 65536 genclntsh creates the library libclntsh.a, just not sure if these warnings damage the library file and are related to my link erros in some way.
i write a select statement in proc that contains 44 columns.
when i precompile it. it is showing the error: implicit conversion of string literal to "char *" is deprecated.when i compile the same select with 40 columns it is not showing any error.
but for more than 40 columns (41-44) it is showing the above error.
Below error getting in alert log file every day,but database is working fine.
What are the reason for this error?
Fatal NI connect error 12170.
VERSION INFORMATION: TNS for 64-bit Windows: Version 11.2.0.1.0 - Production Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production Time: 28-MAY-2012 19:20:02 Tracing not turned on. Tns error struct: ns main err 12535
I am trying to give back data from a stored procedure written in C. I registered the functions as follows:create or replace procedure version(versioninfo OUT clob) as external name "version" library myLib language c with context parameters (context, versioninfo, versioninfo INDICATOR SB4); It compiles fine. The function being called look like this:
If I execute the procedure with SQLDeveloper by pressing "play" it is getting executed but there is no result. If I try to execute it from an anonymous block it results in ORA-22275 instead of doing anything.
declare res clob; begin -- the following doesn't work much --dbms_lob.createtemporary(res,true); version(res); dbms_output.put_line(res); end;
Actually I have to questions: 1.) Why does Oracle give me the error? In my opinion all requirements mentioned by the error description are met. 2.) Why is there no output when executing the function via SQL Developer? Is the usage of OCILobWrite wrong?
I am trying to describe an STP in a package, but it gives me an error.
e.g. In package ABC suppose there is an STP XYZ, I am trying to describe ABC.XYZ function but it gives me an error code 4043 and error message object XYZ.ABC does not exist.
i need to compile a proc program, say prog.pc.have oracle 10g in my system. Since i am new to proc programming, me on the steps to compile the proc program in oracle proc compiler.
in my oci applications,if i get a column of number that is in the scope of int,i can use value = *(int *)field.data; get the value,but if the column size is larger than 10,the code can't be available,how can i get the value.
I am trying to call procedure from PRO C Procedure has many parameters and I do not need to put all of them when I call procedure. Is there way to make the same way as in PL/SQL
My OS is Linux and I installed Oracle 10.2. Everything is fine.I can use sqlplus, exp, imp etc with no problem.Now I have created another linux user test in /home/test. I unzipped basic-10.2xxxxxx.zip (/home/test/instantclient_10_2) and exported LD_LIBRARY_PATH.I guess I have installed instant client in this way.
My testOra.cpp:
#include <occi.h> int main() { return 0; }
This test.cpp would not compile. It cannot find occi.
I declare a cursor for a table with 8000 records, when I fetch the cursor this message appear ORA-03113: end-of-file on communication channels when the fetch reach the 6500 element, What is the problem here?. All data are ok, not null fields.
other problem
How I can reuse a cursor, I declare a cursor for a table where code_part = 300, then I fetch all elements until end cursor, then I close the cursor, Then I declare the same cursor again for the same table where code_part = 359, but it is not successful, when I tried to fetch the cursor again the cobol program show me the last record for the first code, How I can restart the cursor or delete it or freed the cursor position?
I am inserting empno in a table1 and updating another table2 using table1 empno and getting ora-01427 error. I want to print empno for whis this error is coming. How to print that value?
how to integrate SQLnet & c and I'm quite losted at the moment.
Searching with google gives some random stuff, which does seems to be irrelevant.some oracle db somewhere and need for good way to use that remote db (one solution seems to be using SQLnet).
I'm getting this information in sqlnet.log file lying at D:oracleoradatadatabase
Fatal NI connect error 12638, connecting to: (DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oraclemaninder)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')) (CONNECT_DATA=(SID=maninder)(CID=(PROGRAM=d:oracleora92inORACLE.EXE)(HOST=SAI-E6C10175EE4)(USER=OraUser)))) [code]...
If doing an insert into DATE type fields like below... how do I employ null indicator values with the TO_DATE sql to cope with NULL values for the End Date? I can test the NULLness of the pServiceRecord->itemTo value and set the indicator ind_dbToDate to -1 but I don't know how to incorporate this with the to_date syntax (if I can)?
EXEC SQL BEGIN DECLARE SECTION; char dbFromDate[MAX_DATE_LEN]; char dbToDate[MAX_DATE_LEN]; short ind_dbToDate; [code]...
I am using dynamic Pl/SQL with ProC and having problems with cursor. I've to execute stored procedure dynamically and get the result of select list into the cursor. The EXECUTE command is working fine but the FETCH gets failed with error "ORA-01002: fetch out of sequence". I've read that cursor variable can not be used with dynamic SQL.
Stored Procedure: ------------------ ROCEDURE open_mod_cur ( curs IN OUT cur_type, module_id IN varchar2)
I use a cursor to select records from a database table into a C structure as follows...
{ int iLoop = 0; int iResult = 0;
[Code]....
The otc_multiplier field is NULL. As is the to_date sometimes. However, when I output the records later, the entries where the to_date is NULL come out fine (no value). But the otc_multiplier is getting output as 0.0 using...
// this is output later in another fuction using the following.. sprintf(newRecord, "%.1f",daServiceRecs->itemMultiplier);
If using c structures in this manner, what is the method for ensuring that numeric values are set to NULL when required?
I am using the following piece of code to close the connection to the oracle database, I am using the context created in the previous step and passing it to the below code(connection.context)to release the connection.
if (connection.context == 0 || connection.ca == 0) return true; // Multithreading: get the communication area of the context struct sqlca & sqlca = *(connection.ca); EXEC SQL BEGIN DECLARE SECTION;
[code].....
When the above code is executed there is no exception thrown but the connection is not getting close. I am using the V$SESSION system views to monitor the connection created.
I there anything I am missing in my code for the connection closing to fail.