|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Retrieve multiple rows in stored procedure
I have a stored procedure that im trying to retrieve multiple rows.
The stored procedure is: CREATE PROCEDURE SP_RETRIEVE_LISTINGS RETURNS ( LISTINGID INTEGER, LISTING VARCHAR(60)) AS begin /* Procedure Text */ for select listing_id, listing from l_listings into :listingid, :listing do begin suspend; end end When i run it in my IB Expert it pulls the 2 rows. But when i use it in my java code it only pulls the first one: statement = connection().prepareCall("{execute SP_RETRIEVE_LISTINGS }"); result = statement.executeQuery(); items = new SelectItem[2]; while(result.next()) { oId = TypeFormatter.getInteger(result, 1); strList = TypeFormatter.getString(result, 2); items[nLoop] = new SelectItem(oId.toString(), strList); nLoop++; } I have changing the call to the stored procedure from call to execute without any success. It always just loops once. Any ideas on why it is hapenning? Thanks |
|
#2
|
|||
|
|||
|
Quote:
Try connection().prepareCall("{select LISTINGID,LISTING from SP_RETRIEVE_LISTINGS }"); |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Retrieve multiple rows in stored procedure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|