469,927 Members | 1,876 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

SQL SP called with invalid parameter (-301) and WORK?!!

I found code from java - real bug with secondary parameter, should be
Integer but called with String,
But procedure completed without any errors and parameter correctly
transformed to integer!

Is't bug or "feature"? Is that documented?

Because

SQL0301N
The value of input host variable or parameter number number cannot be
used because of its data type.
Explanation:

A host variable or parameter in position number could not be used as
specified in the statement because its data type is incompatible with
the intended use of its value.

This error can occur as a result of specifying an incorrect host
variable or an incorrect SQLTYPE value in a SQLDA on an EXECUTE or OPEN
statement. In the case of a user-defined structured type, the
associated built-in type of the host variable or SQLTYPE might not be
compatible with the parameter of the TO SQL transform function defined
in the transform group for the statement. In the case of performing an
implicit or explicit cast between character and graphic data types,
this error indicates that such a cast was attempted with a non-Unicode
character or graphic string.

<b>The statement cannot be processed.</b>

This is event monitor output - statement 227 is first operator in this
SP.

226) Statement Event ...
Appl Handle: 492
Appl Id: C0A8AB12.NFC4.061205164830
Appl Seq number: 0017

Record is the result of a flush: FALSE
-------------------------------------------
Type : Dynamic
Operation: Execute
Section : 1
Creator : NULLID
Package : SYSSH200
Consistency Token : SYSLVL01
Package Version ID :
Cursor : SQL_CURSH200C1
Cursor was blocking: FALSE
Text : call BMW.ADD_DPMNT1_REQUEST(?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-------------------------------------------
Start Time: 05.12.2006 19:49:59.150521
Stop Time: 05.12.2006 19:49:59.150539
Exec Time: 0.000018 seconds
Number of Agents created: 1
User CPU: 0.000000 seconds
System CPU: 0.000000 seconds
Fetch Count: 0
Sorts: 0
Total sort time: 0
Sort overflows: 0
Rows read: 0
Rows written: 0
Internal rows deleted: 0
Internal rows updated: 0
Internal rows inserted: 0
Bufferpool data logical reads: 0
Bufferpool data physical reads: 0
Bufferpool temporary data logical reads: 0
Bufferpool temporary data physical reads: 0
Bufferpool index logical reads: 0
Bufferpool index physical reads: 0
Bufferpool temporary index logical reads: 0
Bufferpool temporary index physical reads: 0
SQLCA:
sqlcode: -301
sqlstate: 07006
--
227) Statement Event ...
Appl Handle: 492
Appl Id: C0A8AB12.NFC4.061205164830
Appl Seq number: 0017

Record is the result of a flush: FALSE
-------------------------------------------
Type : Static
Operation: Execute
Section : 1
Creator : BMW
Package : P5134509
Consistency Token : NAtNPFKW
Package Version ID :
Cursor :
Cursor was blocking: FALSE
-------------------------------------------
Start Time: 05.12.2006 19:49:59.155408
Stop Time: 05.12.2006 19:49:59.159065
Exec Time: 0.003657 seconds
Number of Agents created: 1
User CPU: 0.000000 seconds
System CPU: 0.000000 seconds
Fetch Count: 0
Sorts: 0
Total sort time: 0
Sort overflows: 0
Rows read: 0
Rows written: 0
Internal rows deleted: 0
Internal rows updated: 0
Internal rows inserted: 0
Bufferpool data logical reads: 0
Bufferpool data physical reads: 0
Bufferpool temporary data logical reads: 0
Bufferpool temporary data physical reads: 0
Bufferpool index logical reads: 0
Bufferpool index physical reads: 0
Bufferpool temporary index logical reads: 0
Bufferpool temporary index physical reads: 0
SQLCA:
sqlcode: 0
sqlstate: 00000

Andy

Dec 5 '06 #1
0 2433

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by David Veeneman | last post: by
2 posts views Thread by Rubycon | last post: by
reply views Thread by jaffar | last post: by
2 posts views Thread by JayvardhanPune | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.