View previous topic :: View next topic
|
Author |
Message |
anant_deshmukh21
New User
Joined: 19 Jun 2007 Posts: 2 Location: pune
|
|
|
|
plz tell mi what is sqlcode -317 and how to solve it.(DB2)[/b] |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I'd ask if you had looked at the manual, but I couldn't find it either...... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forums,
What version of db2 are you running?
What SQL statement raised the error?
Is the -317 correct or might that be a typo? |
|
Back to top |
|
|
Santoshdorge
New User
Joined: 27 Jun 2006 Posts: 48 Location: Pune
|
|
|
|
HI
I found some info about SQLCODE -317 here is the same This may help you.
SQLCODE -317 -CURSOR cursor-name ERROR: MULTIPLE stmt-type
STATEMENTS ATTEMPTED
Explanation: Only one UPDATE statement and one DELETE statement may be coded on a single cursor. The stmt-type field in the message is either UPDATE or DELETE.
The SQLSTATE that equates to this SQL return code is 24S04. |
|
Back to top |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
while posting query please preview the same and check whether you have posted what you wanted to and no typo is entered. I could not find any mention of SQLCODE -317 anywhere, which confirms that there is a typo in your query. Please find the sqlcodes in the range of -300 to -400 below.Hope you will find your answer here.
-300 THE STRING CONTAINED IN HOST VARIABLE OR PARAMETER position-number IS NOT NUL-TERMINATED
-301 THE VALUE OF INPUT HOST VARIABLE OR PARAMETER NUMBER position-number CANNOT BE USED AS SPECIFIED BECAUSE OF ITS DATA TYPE
-302 THE VALUE OF INPUT VARIABLE OR PARAMETER NUMBER position-number IS INVALID OR TOO LARGE FOR THE TARGET COLUMN OR THE TARGET VALUE
-303 A VALUE CANNOT BE ASSIGNED TO OUTPUT HOST VARIABLE NUMBER position-number BECAUSE THE DATA TYPES ARE NOT COMPARABLE
-304 A VALUE WITH DATA TYPE data-type1 CANNOT BE ASSIGNED TO A HOST VARIABLE BECAUSE THE VALUE IS NOT WITHIN THE RANGE OF THE HOST VARIABLE IN POSITION position-number WITH DATA TYPE data-type2
-305 THE NULL VALUE CANNOT BE ASSIGNED TO OUTPUT HOST VARIABLE NUMBER position-number BECAUSE NO INDICATOR VARIABLE IS SPECIFIED
-309 A PREDICATE IS INVALID BECAUSE A REFERENCED HOST VARIABLE HAS THE NULL VALUE
-310 DECIMAL HOST VARIABLE OR PARAMETER number CONTAINS NON DECIMAL DATA.
-311 THE LENGTH OF INPUT HOST VARIABLE NUMBER position-number IS NEGATIVE OR GREATER THAN THE MAXIMUM
-312 UNDEFINED OR UNUSABLE HOST VARIABLE variable-name
-313 THE NUMBER OF HOST VARIABLES SPECIFIED IS NOT EQUAL TO THE NUMBER OF PARAMETER MARKERS
-314 THE STATEMENT CONTAINS AN AMBIGUOUS HOST VARIABLE REFERENCE
-330 A STRING CANNOT BE USED BECAUSE IT CANNOT BE TRANSLATED. REASON reason-code, CHARACTER code-point, HOST VARIABLE position-number
-331 A STRING CANNOT BE ASSIGNED TO A HOST VARIABLE BECAUSE IT CANNOT BE TRANSLATED. REASON reason-code, CHARACTER code-point, POSITION position-number
-332 SYSSTRINGS DOES NOT DEFINE A TRANSLATION FROM CCSID ccsid TO ccsid
-333 THE SUBTYPE OF A STRING VARIABLE IS NOT THE SAME AS THE SUBTYPE KNOWN AT BIND TIME AND THE DIFFERENCE CANNOT BE RESOLVED BY TRANSLATION
-338 AN ON CLAUSE IS INVALID
-339 THE SQL STATEMENT CANNOT BE EXECUTED FROM AN ASCII BASED DRDA APPLICATION REQUESTOR TO A V2R2 DB2 SUBSYSTEM
-351 AN UNSUPPORTED SQLTYPE WAS ENCOUNTERED IN POSITION "" ON A PREPARE or DESCRIBE OPERATION |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
found some info about SQLCODE -317 here is the same This may help you.
|
please, so that we can be enlightened, post the link where You found that info
I searched the manual "DB2 UDB for z/OS V8 Codes" but could not find any info related to sqlcode -317 nor sqlstate 24S04 |
|
Back to top |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
Santosh,
Did you find this in quick reference or elsewhere. Please do let us know as we could not get a single hit with this code or state |
|
Back to top |
|
|
ajinth_c
New User
Joined: 11 May 2007 Posts: 4 Location: Bangalore
|
|
|
|
Hi Ananth ,
I just tried to do a quick reference and found the reason for an SQLCODE of -317
*************************************************************************
>>>>>>>>> Multiple item definitions exist for this item <<<<<<<<<
*****************************************************************************
317 SQLCODE -317 -CURSOR cursor-name ERROR: MULTIPLE stmt-type
STATEMENTS ATTEMPTED
Explanation: Only one UPDATE statement and one DELETE statement may be
coded on a single cursor. The stmt-type field in the message is either
UPDATE or DELETE.
The SQLSTATE that equates to this SQL return code is 24S04.
User Response: Remove the extra UPDATE or DELETE statement.
*****************************************************************************
>>>>>>>>> Multiple item definitions exist for this item <<<<<<<<<
*****************************************************************************
317 SQLCODE -317 (alternate version) -CURSOR REQUIRED
ERROR: CURSOR REQUIRED FOR NON-DYNAMIC SELECT
Explanation: Non-dynamic SELECT statements must be embedded in a
DECLARE CURSOR statement.
User Response: Embed the SELECT in a DECLARE CURSOR statement.
If u can cut and paste the excact portion of the code where you get this error code then I think we should be able to trace the problem .
Cheers,
Ajinth |
|
Back to top |
|
|
|