You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by "Brown, Andrew W (Rosetta)" <An...@Rosettabio.com> on 2007/04/02 23:50:52 UTC

Can I pass an array to a stored procedure?

After reading through the documentation it doesn't seem like passing an
array to a stored procedure is possible:

Java stored procedure:

package com.test.annotation;

public class UpdateData
{
   public static void NewDataAdded(List newIds, long speciesId) throws
SQLException
    {
    	Connection conn = null;
    	try
	{
		etc....


Derby Stored Procedure....

CREATE PROCEDURE gt.newdataadded(IN newIds ??????, IN speciesid BIGINT)
PARAMETER STYLE JAVA MODIFIES SQL DATA LANGUAGE JAVA EXTERNAL NAME 
'com.test.annotation.UpdateData.NewDataAdded';

There doesn't seem to be a datatype to support this.  I tried setting
the datatype to BIGINT but when I called the procedure it would throw an
error 'ERROR 42X50: No method was found that matched the method
call....'  

Is there a way to do this?

- Andrew




Re: Can I pass an array to a stored procedure?

Posted by Øystein Grøvlen <Oy...@Sun.COM>.
Brown, Andrew W (Rosetta) wrote:
> After reading through the documentation it doesn't seem like passing an 
> array to a stored procedure is possible:

Derby does not support the SQL ARRAY type.  So it will not be possible 
to pass arrays as stored procedures.

--
Øystein