By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,908 Members | 1,364 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,908 IT Pros & Developers. It's quick & easy.

ORA-01480 problem

P: n/a
Hello,

I have the following piece of code in my server written in
C++ (CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-12 2002/12/16)
ProC++ (Pro*C/C++: Release 8.1.7.4.0)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
RWCString tmp = "";
EXEC SQL BEGIN DECLARE SECTION;
char dbColValue[10];
short tmpnumber;

short tmpnumberInd;
short dbColValueInd;
EXEC SQL END DECLARE SECTION;

select Column1 into :dbColValue:dbColValueInd from Table1;

if (dbColValueInd == -1)
tmp = "";
else
tmp = RWCString(dbColValue).strip();

strcpy(dbColValue,tmp);

select 1 into :tmpnumber:tmpnumberInd from Table2 where Column2 =
:dbColValue;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
I am getting intermittent ORA-1480 (Bind value not terminated by null)
error. A similar piece of code is working fine elsewhere. Cant find a
mistake in the code. Also, I am not able to replicate this error, but
is occurring intermittently.

Any help/ideas is highly appreciated.

Regards,
Ravi.

Dec 18 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a

ravi wrote:
Hello,

I have the following piece of code in my server written in
C++ (CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-12 2002/12/16)
ProC++ (Pro*C/C++: Release 8.1.7.4.0)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
RWCString tmp = "";
EXEC SQL BEGIN DECLARE SECTION;
char dbColValue[10];
short tmpnumber;

short tmpnumberInd;
short dbColValueInd;
EXEC SQL END DECLARE SECTION;

select Column1 into :dbColValue:dbColValueInd from Table1;

if (dbColValueInd == -1)
tmp = "";
else
tmp = RWCString(dbColValue).strip();

strcpy(dbColValue,tmp);

select 1 into :tmpnumber:tmpnumberInd from Table2 where Column2 =
:dbColValue;
If that's C++, you need to cut back on the macros. --mpa

Dec 18 '06 #2

P: n/a

ravi wrote:
Hello,

I have the following piece of code in my server written in
C++ (CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-12 2002/12/16)
ProC++ (Pro*C/C++: Release 8.1.7.4.0)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
RWCString tmp = "";
EXEC SQL BEGIN DECLARE SECTION;
char dbColValue[10];
short tmpnumber;

short tmpnumberInd;
short dbColValueInd;
EXEC SQL END DECLARE SECTION;

select Column1 into :dbColValue:dbColValueInd from Table1;

if (dbColValueInd == -1)
tmp = "";
else
tmp = RWCString(dbColValue).strip();

strcpy(dbColValue,tmp);

select 1 into :tmpnumber:tmpnumberInd from Table2 where Column2 =
:dbColValue;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
I am getting intermittent ORA-1480 (Bind value not terminated by null)
error. A similar piece of code is working fine elsewhere. Cant find a
mistake in the code. Also, I am not able to replicate this error, but
is occurring intermittently.

Any help/ideas is highly appreciated.

Regards,
Ravi.
Take your issue to ORA's forums, this has got nothing to do with C++.
There is no such thing as a RWCString either (whatever that is).

Dec 18 '06 #3

P: n/a
If that's C++, you need to cut back on the macros. --mpa

Could you please elaborate on what you mean by macros? Thanks.
My guess is that strcy(oracle_char_var,RWCString) is not working
properly.
Both are structures and not char *. I am not sure if the implicit cast
is working properly.
Also, I am not sure if it is the best way to copy the information. Unit
testing this part alone produced proper results without any anomalies.

The frustrating part is that it is intermittent and hence finding it
extremely hard to replicate. Any ideas for replication are also
appreciated.

Do you see any memory leakage problems with the code?

Ravi.

Dec 20 '06 #4

P: n/a

Salt_Peter wrote:
Take your issue to ORA's forums, this has got nothing to do with C++.
There is no such thing as a RWCString either (whatever that is).
Thanks for the suggestion. I have posted the query in oracle forum
also.
btw, RWCString a Rogue Wave String class for C++. Google for it for
more information.
Thanks again !

Regards,
Ravi

Dec 20 '06 #5

P: n/a
ravi schreef:
Salt_Peter wrote:
Take your issue to ORA's forums, this has got nothing to do with C++.
There is no such thing as a RWCString either (whatever that is).

Thanks for the suggestion. I have posted the query in oracle forum
also.
btw, RWCString a Rogue Wave String class for C++.
There are quite a few string classes for C++, but there is only one C++
(ok, there's a 2003 service pack :) )
Hence, in comp.lang.c++ we don't know all string classes, but I bet
Rogue Wave is familiar with C++ if they're writing C++ classes. So if
your question is about RW products in combination with C++, the
best place is to ask RW. If with Oracle, ask Oracle, etc.

HTH,
Michiel Salters

Dec 20 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.