473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ORA-01480 problem

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
5 4425

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

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
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

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Subrahmanyam Arya | last post by:
Dear oracle gurus, I am unable to get past the error ORA-12154: TNS: could not resolve service name on my host when using hsodbc to talk to a remote mysql database. i got from the meta link all...
1
by: Galina | last post by:
Hello I have created a trigger not to let records with certain fields null to be inserted into the table: BEGIN IF :new.RUL_CODE is null or :new.FES_UINS_CODE is null or :new.FES_UIO_CALOCC is...
6
by: John | last post by:
Hi Right password -> ORA-12154: TNS:Could not resolve service name wrong password => ORA-01017: invalid username/password; logon denied Tested on a Windows XP client connecting to Oracle on...
6
by: bdj | last post by:
Hello! I have at set of tnsnames.ora. I wich to make an union, e.g. a single file of it. How can I do that easy? Greetings Bjørn
2
by: Sheela | last post by:
I am trying to access the tables of a remote database(db2) from db1 database. I am getting the following error: ORA-12154: TNS:could not resolve service name I tried tnsping the db2 service_name...
4
by: Tig | last post by:
Hi all. I have a need to connect to an Oracle 7.3.3.5 database. I have a user who successfully connects to it with her Oracle 7.3 client. I have an Oracle 9.2 client installed on my machine. ...
0
by: DavidTurcotte | last post by:
Hi I have been working on this bugs for the last 2 days and i am out of gas. i have a ORA-12154: TNS:could not resolve service name error message when i try to acces an Oracle database The...
2
by: mpatel6 | last post by:
I had this error in alert log and my instance was down, anybody can help me? Errors in file /u01/app/oracle/admin/sotstest/bdump/sotstest_p004_626740.trc: ORA-07445: exception encountered: core...
2
by: Dwie | last post by:
Dear All, I'm a new in Oracle DB. I'm using Windows 2000 as server and Windows XP as client. I installed Oracle Enterprise on server and Oracle 8.1 on clients. I have some client with 2 different...
0
by: wolfee | last post by:
I'm running 10gR2 RAC in Prod, Test and DEV and after doing a clone to the DEV environment I'm getting a wierd ORA-12514 error for only one node. I can tnsping the node and it comes back fine. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.