Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Pro*C Dynamic SQL method 4 problem in 8.1.5
Listers,
We recently migrated a database from 7.3.4 to 8.1.5 on Sun Solaris 2.6. Enterprise Edition.
One of our developers sent me this problem. Problem history reads from the bottom of this mail to the top.
The developer was using Dynamic SQL method 4. Some functions are no longer available in 8.1.5 so she replaced them with the recommended new function and now the code won't compile. She followed the example she read in the Oracle documentation to no avail.
I don't know anything about C or Pro*C. Has anyone seen this problem before upon migration? Can anyone give me a hint about how to fix this compiler error?
By the way, we use longs in this database. I am concerned that this may be a problem.
Thanks in advance for any light anyone can shed on this.
Cherie
Cherie Machler
Gelco Information Network
Cindy Johnson
12/04/2000 09:23 AM
To: Cherie Machler/GELCO_at_GELCO
cc: Upender Nazir/GELCO_at_GELCO, David L Mortenson/GELCO_at_GELCO
Subject: Re: Oracle 8i migration issue (Document link: Cherie Machler)
Well, I don't get the compiler error anymore, but the code doesn't compile.
I have followed the Oracle documentation examples EXACTLY. Any other ideas?
Here's the errors:
proc iname=CDbAxs.pc
Pro*C/C++: Release 8.1.5.0.0 - Production on Mon Dec 4 09:22:28 2000
(c) Copyright 1999 Oracle Corporation. All rights reserved.
System default option values taken from: /orasoft/oracle/product/8i/precomp/admin/pcscfg.cfg
Syntax error at line 136, column 2, file CDbAxs.pc: Error at line 136, column 2 in file CDbAxs.pc
SQLSQLDAFree(SQL_SINGLE_RCTX, bind_dp);
.1
PCC-S-02201, Encountered the symbol ")" when expecting one of the following:
( * & + - ~ ! ^ ++ -- ... sizeof, an identifier,
a quoted string, a numeric constant,
Syntax error at line 136, column 40, file CDbAxs.pc: Error at line 136, column 40 in file CDbAxs.pc
SQLSQLDAFree(SQL_SINGLE_RCTX, bind_dp);
.......................................1PCC-S-02201, Encountered the symbol ";" when expecting one of the following:
, = ( ) [ * ? | & < > + - / % . ^ *= /= %= += -= <<= >>= &&= ||= ^= | & == != <= >= << >> ++ -- -> The symbol ")" was substituted for ";" to continue.
Syntax error at line 137, column 2, file CDbAxs.pc: Error at line 137, column 2 in file CDbAxs.pc
SQLSQLDAFree(SQL_SINGLE_RCTX, select_dp);
.1
PCC-S-02201, Encountered the symbol ")" when expecting one of the following:
( * & + - ~ ! ^ ++ -- ... sizeof, an identifier,
a quoted string, a numeric constant,
Syntax error at line 137, column 42, file CDbAxs.pc: Error at line 137, column 42 in file CDbAxs.pc
SQLSQLDAFree(SQL_SINGLE_RCTX, select_dp);
.........................................1PCC-S-02201, Encountered the symbol ";" when expecting one of the following:
, = ( ) [ * ? | & < > + - / % . ^ *= /= %= += -= <<= >>= &&= ||= ^= | & == != <= >= << >> ++ -- -> The symbol ")" was substituted for ";" to continue.
Syntax error at line 217, column 13, file CDbAxs.pc: Error at line 217, column 13 in file CDbAxs.pc
SQLSQLDAAlloc(SQL_SINGLE_RCTX, size, max_vname_len, max_iname_len))
== (SQLDA *) 0)
............1
PCC-S-02201, Encountered the symbol ")" when expecting one of the following:
( * & + - ~ ! ^ ++ -- ... sizeof, an identifier,
a quoted string, a numeric constant,
Syntax error at line 217, column 13, file CDbAxs.pc: Error at line 217, column 13 in file CDbAxs.pc
SQLSQLDAAlloc(SQL_SINGLE_RCTX, size, max_vname_len, max_iname_len))
== (SQLDA *) 0)
............1
PCC-S-02201, Encountered the symbol ")" when expecting one of the following:
; , = ( [ * ? | & < > + - / % . ^ *= /= %= += -= <<= >>= &&= ||= ^= | & == != <= >= << >> ++ -- -> The symbol "( was inserted before ")" to continue.
Syntax error at line 217, column 95, file CDbAxs.pc: Error at line 217, column 95 in file CDbAxs.pc
SQLSQLDAAlloc(SQL_SINGLE_RCTX, size, max_vname_len, max_iname_len)) == (SQLDA *) 0)
..............................................................................................1
; , ( [ * ? | & < > + - / % . ^ | & == != <= >= << >> ++ --
->
The symbol "; was inserted before ")" to continue.
Syntax error at line 225, column 9, file CDbAxs.pc: Error at line 225, column 9 in file CDbAxs.pc
SQLSQLDAAlloc(SQL_SINGLE_RCTX, size, max_vname_len, max_iname_len)) == (
SQLDA *) 0)
........1
PCC-S-02201, Encountered the symbol ")" when expecting one of the following:
( * & + - ~ ! ^ ++ -- ... sizeof, an identifier,
a quoted string, a numeric constant,
Syntax error at line 225, column 9, file CDbAxs.pc: Error at line 225, column 9 in file CDbAxs.pc
SQLSQLDAAlloc(SQL_SINGLE_RCTX, size, max_vname_len, max_iname_len)) == (
SQLDA *) 0)
........1
PCC-S-02201, Encountered the symbol ")" when expecting one of the following:
; , = ( [ * ? | & < > + - / % . ^ *= /= %= += -= <<= >>= &&= ||= ^= | & == != <= >= << >> ++ -- -> The symbol "( was inserted before ")" to continue.
Syntax error at line 225, column 91, file CDbAxs.pc: Error at line 225, column 91 in file CDbAxs.pc
SQLSQLDAAlloc(SQL_SINGLE_RCTX, size, max_vname_len, max_iname_len)) == ( SQLDA *) 0)
..........................................................................................1
; , ( [ * ? | & < > + - / % . ^ | & == != <= >= << >> ++ --
->
The symbol "; was inserted before ")" to continue.
Syntax error at line 246, column 1, file CDbAxs.pc:
Error at line 246, column 1 in file CDbAxs.pc
{
1
PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
; , = ( [ * ? | & < > + - / % . ^ *= /= %= += -= <<= >>= &&= ||= ^= | & == != <= >= << >> ++ -- -> The symbol ";" was substituted for "{" to continue.
Syntax error at line 276, column 1, file CDbAxs.pc:
Error at line 276, column 1 in file CDbAxs.pc
{
1
PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
; , = ( [
The symbol ";" was substituted for "{" to continue.
Syntax error at line 349, column 9, file CDbAxs.pc: Error at line 349, column 9 in file CDbAxs.pc
SQLColumnNullCheck (SQL_SINGLE_RCTX, (unsigned short *)&(select_dp->T[i]
), (unsigned short *)&(select_dp->T[i]), &null_ok);
........1
PCC-S-02201, Encountered the symbol ")" when expecting one of the following:
( * & + - ~ ! ^ ++ -- ... sizeof, an identifier,
a quoted string, a numeric constant,
Syntax error at line 349, column 9, file CDbAxs.pc: Error at line 349, column 9 in file CDbAxs.pc
SQLColumnNullCheck (SQL_SINGLE_RCTX, (unsigned short *)&(select_dp->T[i]
), (unsigned short *)&(select_dp->T[i]), &null_ok);
........1
PCC-S-02201, Encountered the symbol ")" when expecting one of the following:
; , = ( [ * ? | & < > + - / % . ^ *= /= %= += -= <<= >>= &&= ||= ^= | & == != <= >= << >> ++ -- -> The symbol "(" was substituted for ")" to continue.
Syntax error at line 359, column 17, file CDbAxs.pc: Error at line 359, column 17 in file CDbAxs.pc
SQLNumberPrecV6 (SQL_SINGLE_RCTX, (unsigned long *)&(select_dp->L[i]), &precision, &scale);
................1
( * & + - ~ ! ^ ++ -- ... sizeof, an identifier,
a quoted string, a numeric constant,
Syntax error at line 359, column 17, file CDbAxs.pc: Error at line 359, column 17 in file CDbAxs.pc
SQLNumberPrecV6 (SQL_SINGLE_RCTX, (unsigned long *)&(select_dp->L[i]), &precision, &scale);
................1
; , = ( [ * ? | & < > + - / % . ^ *= /= %= += -= <<= >>= &&= ||= ^= | & == != <= >= << >> ++ -- -> The symbol "(" was substituted for ")" to continue.
Syntax error at line 506, column 1, file CDbAxs.pc:
Error at line 506, column 1 in file CDbAxs.pc
{
1
PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
; , = ( [
The symbol ";" was substituted for "{" to continue.
Syntax error at line 0, column 0, file CDbAxs.pc: Error at line 0, column 0 in file CDbAxs.pc PCC-S-02201, Encountered the symbol "<eof>" when expecting one of the following:
; { } ( * & + - ~ ! ^ ++ -- ... auto, break, case, char, const, continue, default, do, double, enum, extern, float, for, goto, if, int, long, ulong_varchar, OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIExtProcContext, OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register, return, short, signed, sizeof, sql_context, sql_cursor, static, struct, switch, typedef, union, unsigned, utext, uvarchar, varchar, void, volatile, while, an identifier, a typedef name, a precompiled header, a quoted string, a numeric constant, exec oracle, exec, exec sql, exec sql begin, exec sql type, exec sql var, exec sql include,
Error at line 0, column 0 in file CDbAxs.pc PCC-F-02102, Fatal error while doing C preprocessing
Cherie Machler
11/30/2000 11:22 AM
To: Cindy Johnson/GELCO_at_GELCO
cc: Upender Nazir/GELCO_at_GELCO, David L Mortenson/GELCO_at_GELCO
Subject: Oracle 8i migration issue
I've picked up new files pcpus.msg and pcpus.msb and put them on /orasoft/oracle/product/8i/precomp/mesg
This is the fix recommended for the bug I noted previously. Now I guess you recompile and see what happens. I think this fix should give you better compiler error messages.
Let us know how it goes.
Thanks,
Cherie
---------------------- Forwarded by Cherie Machler/GELCO on 11/30/2000 12:17 PM ---------------------------
Subject: Oracle 8i migration issue
I have a C module that using Dynamic SQL method 4. When I recompiled and ran after the Oracle 8i upgrade, the program core dumps.
I checked the Oracle documentation, and it shows that the following Dynamic SQL method 4 functions are no longer supported:
sqlald
sqlprc
sqlnul
sqlclu
So I changed the code to use the new functions, and now the ProC compiler aborts.
Here's the compiler output:
$ make -f proc.mk CDbAxs.o
proc iname=CDbAxs.pc
Pro*C/C++: Release 8.1.5.0.0 - Production on Wed Nov 29 16:10:57 2000
(c) Copyright 1999 Oracle Corporation. All rights reserved.
System default option values taken from: /orasoft/oracle/product/8i/precomp/admi Received on Mon Dec 04 2000 - 12:02:43 CST