SQL query in Pro-C fails with Error:02115 -


i getting weird behavior of pro-c procedure 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, source) \ { \ (void)memcpy((void*)(dest), (void*)(source).arr, (size_t)(source).len); \ (dest)[(source).len] = '\0'; \ }   long fnsqlmarkprocessed (char *pszrowid, char *pszmarker) {   bghcpy_to_ora (o_rowid_stack,    pszrowid);   bghcpy_to_ora (o_cust_processed, pszmarker);    exec sql        update  document_all           set  processed_by_bgh = :o_cust_processed          rowid = :o_rowid_stack;    return (sqlca.sqlcode); } 

the input arguments values passed above function

pszrowid = [aaaf1laaiaabooraab], pszmarker=x 

the query return error code:02115 following message:

sql error:02115 code interpretation problem -- check common_name usage 

i using oracle backend database.

can provide me information on possible causes failed query?

any highly appreciated.

flags used during pro-c compilation defined below:

------/u01/app/oracle/product/8.1.6/oracle_home/bin/proc `echo  -dbscs5 -dsun5 -i/export/home/bscsobw/bscs6/src/coredumpissue/final_code_fix_004641  -dndebug -dsunos53 -d_posix_4sources -i/usr/generic++/generic++2.5.3.64_bit/include  -dfeature_212298 -dbscs_config -i/export/home/bscsobw/bscs6//src/bat/include -dfeature_00203808_gmd -dfeature_00241737  -doracle_db_brand -i/u01/app/oracle/product/8.1.6/oracle_home/rdbms/demo -i/u01/app/oracle/product/8.1.6/oracle_home/precomp/public -i/export/home/bscsobw/bscs6/src/coredumpissue/final_code_fix_004641/include -i../bat/include -dfeature61717 -dfeature52824 -dfeature56178 -dd236312_d -dsdp -g | sed -e 's/-i/include=/g' -e 's/-d[^ ]=[^ ]*//g' -e 's/-d\([^ ]*\)/define=\1/g'` select_error=no   define=feature61717 define=feature52824 define=feature56178 \                 lines=yes iname=bgh_esql.pc oname=bgh_esql.c lname=bgh_esql.lis 

i think, check message:

[oracle@sb-rac02 ~]$ oerr sql 2115 02115, 00000, "code interpretation problem -- check common_name usage" // *cause: pro*fortran, error occurs if precompiler option //         common_name specified incorrectly.  **with other oracle //         precompilers, error occurs when precompiler cannot //         generate section of code.** // *action: pro*fortran, when using common_name precompile 2 or //          more source modules, make sure specify different common name //          each module.  other oracle precompilers, if error //          persists, call customer support assistance. 

so can determine, problem not in variables.

please, try use code this:

long fnsqlmarkprocessed (char *pszrowid, char *pszmarker) {   bghcpy_to_ora (o_rowid_stack,    pszrowid);   bghcpy_to_ora (o_cust_processed, pszmarker);    exec sql update  document_all           set  processed_by_bgh = :o_cust_processed          rowid = :o_rowid_stack;    return (sqlca.sqlcode); } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -