Home » Developer & Programmer » Precompilers, OCI & OCCI » sqladt is initialized twice.
sqladt is initialized twice. [message #564352] |
Thu, 23 August 2012 01:04 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/40cfa5b80d3b3cc4ce4180f647aee8fc?s=64&d=mm&r=g) |
sarada6378
Messages: 3 Registered: August 2012
|
Junior Member |
|
|
Hi,
I am a newbie working with c++ and pro c.
I have created a structure and am fetching the values from the select query into the structure.
I am trying to add the structure into a vector.
Here is the code snippet
EXEC SQL AT :O_dbhandle DECLARE DISCDEF CURSOR FOR SELECT CUSTOMER_ID,START_DATE,END_DATE,DISCOUNT_TYPE,DISCOUNT_VALUE FROM S
H_IVDC_DISCOUNT_DEFINITIONS;
EXEC SQL AT :O_dbhandle OPEN DISCDEF ;
EXEC SQL WHENEVER NOT FOUND DO print_not_found_msg();
for(int i=0;i<miCfcode;i++){
EXEC SQL FETCH DISCDEF INTO :shdef;
discvals.push_back(shdef);
}
EXEC SQL CLOSE DISCDEF;
I am getting the following error on compilation
Error: sqladt is initialized twice.
Error: Multiple declaration for sqladt.
Error: sqltds is initialized twice.
Error: Multiple declaration for sqltds.
Error: sqlfpn is initialized twice.
Error: Multiple declaration for sqlfpn.
Error: sqlctx is initialized twice.
Error: Multiple declaration for sqlctx.
Please let me know the problem/issue
|
|
|
|
|
|
|
Re: sqladt is initialized twice. [message #564455 is a reply to message #564385] |
Fri, 24 August 2012 00:31 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/40cfa5b80d3b3cc4ce4180f647aee8fc?s=64&d=mm&r=g) |
sarada6378
Messages: 3 Registered: August 2012
|
Junior Member |
|
|
I still get the error even though i used the query
EXEC SQL AT :O_dbhandle DECLARE DISCDEF CURSOR FOR SELECT CUSTOMER_ID,SCCODE,TMCODE,SNCODE,ZPCODE,START
_DATE,END_DATE,DISCOUNT_TYPE,DISCOUNT_VALUE FROM SYSADM.SH_IVDC_DISCOUNT_DEFINITIONS;
Any operation that i do other than printing between the lines
EXEC SQL FETCH DISCDEF INTO :shdef;
and
EXEC SQL CLOSE DISCDEF;
I get the following error
"vdhOracle.cpp", line 41: Error: sqladt is initialized twice.
"vdhOracle.cpp", line 41: Error: Multiple declaration for sqladt.
"vdhOracle.cpp", line 53: Error: sqltds is initialized twice.
"vdhOracle.cpp", line 53: Error: Multiple declaration for sqltds.
"vdhOracle.cpp", line 65: Error: sqlfpn is initialized twice.
"vdhOracle.cpp", line 65: Error: Multiple declaration for sqlfpn.
"vdhOracle.cpp", line 72: Error: sqlctx is initialized twice.
"vdhOracle.cpp", line 72: Error: Multiple declaration for sqlctx.
"vdhOracle.cpp", line 114: Error: sqlstm is initialized twice.
"vdhOracle.cpp", line 114: Error: Multiple declaration for sqlstm.
"vdhOracle.cpp", line 128: Error: IAPSUCC is initialized twice.
"vdhOracle.cpp", line 128: Error: Multiple declaration for IAPSUCC.
"vdhOracle.cpp", line 128: Error: IAPSUCC is initialized twice.
"vdhOracle.cpp", line 129: Error: IAPFAIL is initialized twice.
"vdhOracle.cpp", line 129: Error: Multiple declaration for IAPFAIL.
"vdhOracle.cpp", line 129: Error: IAPFAIL is initialized twice.
"vdhOracle.cpp", line 130: Error: IAPFTL is initialized twice.
"vdhOracle.cpp", line 130: Error: Multiple declaration for IAPFTL.
"vdhOracle.cpp", line 130: Error: IAPFTL is initialized twice.
"vdhOracle.cpp", line 133: Error: sq0003 is initialized twice.
"vdhOracle.cpp", line 133: Error: Multiple declaration for sq0003.
"vdhOracle.cpp", line 138: Error: Multiple declaration for VARCHAR.
"vdhOracle.cpp", line 139: Error: Multiple declaration for varchar.
"vdhOracle.cpp", line 142: Error: sqlcud0 is initialized twice.
"vdhOracle.cpp", line 142: Error: Multiple declaration for sqlcud0.
Compilation aborted, too many Error messages.
|
|
|
|
Goto Forum:
Current Time: Sat Sep 07 18:41:30 CDT 2024
|