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

Limit on number of params to an SP?

sql = "CALL " + myschema + ".MYSPROC(?,?,?,?,?,?,?,?,?)";
rs = con.prepareCall(sql);

rs.setString(1, user);
rs.setString(2, action);
rs.setString(3, versions);
rs.setString(4, spec);
rs.setString(5, where);
rs.setString(6, server);
rs.setString(7, flag);
rs.registerOutParameter(8, Types.INTEGER);
rs.registerOutParameter(9, Types.VARCHAR);

I'm trying to call this SP (running on DB2 v7 on z/OS), but I get an
exception saying that index 9 is out of bounds on the last
registerOutParameter() call.

Is it possible that this code breaks a restriction on the number
params that you can pass in? Any other ideas?
Nov 12 '05 #1
1 1615

"Erik Brown" <er********@gmail.com> wrote in message
news:3c**************************@posting.google.c om...
sql = "CALL " + myschema + ".MYSPROC(?,?,?,?,?,?,?,?,?)";
rs = con.prepareCall(sql);

rs.setString(1, user);
rs.setString(2, action);
rs.setString(3, versions);
rs.setString(4, spec);
rs.setString(5, where);
rs.setString(6, server);
rs.setString(7, flag);
rs.registerOutParameter(8, Types.INTEGER);
rs.registerOutParameter(9, Types.VARCHAR);

I'm trying to call this SP (running on DB2 v7 on z/OS), but I get an
exception saying that index 9 is out of bounds on the last
registerOutParameter() call.

Is it possible that this code breaks a restriction on the number
params that you can pass in? Any other ideas?


I very much doubt that you are breaking the limit on the number of
parameters. I know that the limit was 90 on DB2 V7 for Windows/Linux/Unix so
I doubt the z/OS limit would be lower, especially as low as 8. I've tried
looking for the limit in the V7 z/OS manuals but can't find it despite
checking several manuals and using various search terms; I'm starting to
think that the limit isn't in the manual although that would surprise me.
However, I would be very surprised if the limit was less than 9.

It's very hard to give other suggestions since you have not supplied an
exact error message. The fragment of code you have posted looks OK to me. I
could see this error - or something like it - occurring if the number of
parameter markers in your 'call' statement was 8 or fewer but it looks to me
as if you have 9.

Do you have a debugger? If so, maybe you can step trace your way through the
code, watching carefully, and see if anything unexpected happens *before*
you throw the exception. I just tried stepping through similar code and
didn't see anything very interesting happen but maybe something will jump
out at you.

Also, it might be useful for you to look through some other stored
procedures at your company and verify that 9 parameters is not over the
limit for z/OS; if you've got other stored procedures with 9 or more
parameters running successfully, then you can be certain that isn't the
problem.

Posting your exact Exception and the SQLCode you got may also be useful.

I can't think of anything else at this point.

Rhino
Nov 12 '05 #2

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

Similar topics

2
by: Afkamm | last post by:
Hi, :) The preg_replace function... preg_replace(pattern, replacement, subject ) How on earth do you get the limit value to work with arrays? In my code both the pattern and replacement...
7
by: Joey C. | last post by:
Hello, I'm designing a small "briefcase" program that will allow me to quickly upload, download, and delete files in a briefcase. The only real things that I have left to do are to design a...
0
by: D. Dante Lorenso | last post by:
I need to know that original number of rows that WOULD have been returned by a SELECT statement if the LIMIT / OFFSET where not present in the statement. Is there a way to get this data from PG ?...
3
by: ken | last post by:
Hi, I was wondering how the 4k table record limit is counted. I have access 2k. I text fields are 256 chars. Memo fields are not included in the calculation. What about yes/no fields would that be...
27
by: ted benedict | last post by:
hi everybody, i hope this is the right place to discuss this weird behaviour. i am getting dynamically generated text or xml from the server side using xmlhttprequest. if the server side data is...
18
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
5
by: K Viltersten | last post by:
I discovered that when requested http://localhost:52698/ws3/page.aspx and issued a call Response.Write(Request.Params.Count); i got 50 parameters in count. When i actually added some as...
0
by: tony_in_da_uk | last post by:
On Jul 22, 5:27 am, eran <kale...@gmail.comwrote: I'm also with the params struct w/ constructor approach, but just to for a hoot I'll illustrate an alternative (pretty absurd) approach, which...
5
by: kaushal30 | last post by:
I am getting this error when I call a stored procedure from my C# code. It is a simple stored procedure with six params that inserts data : PROCEDURE LHD_SUR_ADMNEXP_HDR_INS ( ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.