473,397 Members | 2,099 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,397 software developers and data experts.

Matching SQLCODES to SQL Statements

Is there a guide, pamphlet, book, website, PDF or scroll somewhere
which states the SQLCODES which are valid for each SQL statement
(i.e., INSERT, CALL, FETCH, DECLARE CURSOR) in IBM DB2 (v7 or 8)?

I sometimes fall into the situation where someone has coded (or not) a
questionable EVALUATE SQLCODE statement after an EXEC SQL statement.

Thanks to all of you, in advance, for your support!
Nov 29 '07 #1
5 1962
On Nov 29, 2:55 pm, BugleBoy <dfaill...@gmail.comwrote:
Is there a guide, pamphlet, book, website, PDF or scroll somewhere
which states the SQLCODES which are valid for each SQL statement
(i.e., INSERT, CALL, FETCH, DECLARE CURSOR) in IBM DB2 (v7 or 8)?

I sometimes fall into the situation where someone has coded (or not) a
questionable EVALUATE SQLCODE statement after an EXEC SQL statement.

Thanks to all of you, in advance, for your support!
Hi,

The SQLCODE seems to be included with each SQL Statement topic in the
Info Center. For example, the V8 Insert statement has them in it:

http://publib.boulder.ibm.com/infoce...n/r0000970.htm

Is this what you are looking for?

Louise McNicoll
DB2 Information Development

Nov 30 '07 #2
Hi,
>
The SQLCODE seems to be included with each SQL Statement topic in the
Info Center. For example, the V8 Insert statement has them in it:

http://publib.boulder.ibm.com/infoce...ic/com.ibm.db2...

Is this what you are looking for?

Louise McNicoll
DB2 Information Development
Well ... it has some SQLSTATE codes for some specific conditions
like ..."If the result table is empty, SQLCODE is set to +100 and
SQLSTATE is set to '02000'."

But, is there a table or display which lists the probable SQLCODEs for
a specific statment, with out reading the whole explanation of the
usage of the statement.

Thanks for your help so far Louise!
Dec 3 '07 #3
Bugleboy,

The SQL Reference manual typically lists SQLSTATEs.
Can you use these instead? SQLCODE are less portable across vendors.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Dec 4 '07 #4
On Dec 3, 5:33 pm, BugleBoy <dfaill...@gmail.comwrote:
>
Well ... it has some SQLSTATE codes for some specific conditions
like ..."If the result table is empty, SQLCODE is set to +100 and
SQLSTATE is set to '02000'."

But, is there a table or display which lists the probable SQLCODEs for
a specific statment, with out reading the whole explanation of the
usage of the statement.

Thanks for your help so far Louise
Hi, I checked with our other writers and we don't have such a table or
list. The best suggestion that I got for you was that you can perhaps
use the search feature to return all the statements with a specific
code or state.

Regards,

Louise McNicoll
DB2 Information Development
Dec 5 '07 #5

"BugleBoy" <df*******@gmail.comwrote in message
news:1a**********************************@w34g2000 hsg.googlegroups.com...
Is there a guide, pamphlet, book, website, PDF or scroll somewhere
which states the SQLCODES which are valid for each SQL statement
(i.e., INSERT, CALL, FETCH, DECLARE CURSOR) in IBM DB2 (v7 or 8)?

I sometimes fall into the situation where someone has coded (or not) a
questionable EVALUATE SQLCODE statement after an EXEC SQL statement.

Thanks to all of you, in advance, for your support!
You can make an extract from "Message Reference Vol.2" db2m2e90.pdf and
create a cross reference
for sqlstates vs sqlcodes.
/dg
Dec 5 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Adam | last post by:
Hello all, I have written a script that utilizes mysql_unbuffered_query to quickly perform a series of if statements on the returned row as my result sets are roughly 50,000,000+ in size. ...
31
by: bart | last post by:
Why is it that everybody likes the follwowing curly braces syntax function() { implementations; } I find the following much better to read (C style) function() {
2
by: Smith | last post by:
I have a situation where I want to pull strings from one table of a SQL 2000 database and find matches for it in other tables of the same database and have those values returned. i.e. In one...
7
by: Matt L. | last post by:
In summary, I don't know how/why the following code works and would like to know. I'm trying to match the first 3 characters of a variable (filename). The code below crudely works, but only if I...
0
by: Shane | last post by:
I have a readonly DB2 database and its standby on another box. My CLI applications normally work with the primary DB. If there are communication errors or instance corruption, the applications...
5
by: olaufr | last post by:
Hi, I'd need to perform simple pattern matching within a string using a list of possible patterns. For example, I want to know if the substring starting at position n matches any of the string I...
2
by: Ole Nielsby | last post by:
First, bear with my xpost. This goes to comp.lang.c++ comp.lang.functional with follow-up to comp.lang.c++ - I want to discuss an aspect of using C++ to implement a functional language, and...
0
by: moconno5 | last post by:
Hello again, I am still working on my same project and have run into another little problem. I have created a flat file with data from a server, each line looks like this: BLAT Search Results ...
1
by: sora | last post by:
Hi, I've developed a MFC program under VS 6.0. My debugger *was* working fine and I've used it often for my project. Then, one day, the errors below appear and they prevent me from using the...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.