Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 23rd, 2006, 06:19 PM
samh5792 samh5792 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 8 samh5792 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 30 m 52 sec
Reputation Power: 0
Question Error: multiple rows in singleton select

I have successfully compiled my very first select procedure :-) inside IBOConsole, but I get "Error: multiple rows in singleton select" when I call it using:
“select * from SelProc_All_Constituents"
from within my app AND inside IBOConsole.
My app needs to be able to go to a selected record, edit it, and navigate up and down the dataset.

This is my select procedure:
SelProc_All_Constituents
=======================
set term ^;
create procedure SelProc_All_Constituents
RETURNS (
constituentID integer,CT_Code integer,Inactive_YN varchar(3))
as
begin
select constituentID,CT_Code,Inactive_YN from constituents
into :constituentID,:CT_Code,:Inactive_YN;
suspend;
end^

Any hints appreciated.
Thx
Sam Hunt

Reply With Quote
  #2  
Old March 24th, 2006, 12:56 AM
badukist badukist is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 62 badukist User rank is Corporal (100 - 500 Reputation Level)badukist User rank is Corporal (100 - 500 Reputation Level)badukist User rank is Corporal (100 - 500 Reputation Level)badukist User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 3 m 18 sec
Reputation Power: 7
Send a message via Yahoo to badukist
Quote:
Originally Posted by samh5792
I have successfully compiled my very first select procedure :-) inside IBOConsole, but I get "Error: multiple rows in singleton select" when I call it using:
“select * from SelProc_All_Constituents"
from within my app AND inside IBOConsole.
My app needs to be able to go to a selected record, edit it, and navigate up and down the dataset.

This is my select procedure:
SelProc_All_Constituents
=======================
set term ^;
create procedure SelProc_All_Constituents
RETURNS (
constituentID integer,CT_Code integer,Inactive_YN varchar(3))
as
begin
select constituentID,CT_Code,Inactive_YN from constituents
into :constituentID,:CT_Code,:Inactive_YN;
suspend;
end^

Any hints appreciated.
Thx
Sam Hunt


You need :
begin
for select constituentID,CT_Code,Inactive_YN from constituents
into :constituentID,:CT_Code,:Inactive_YN do
begin
suspend;
end
end^

for multiple rows select

Reply With Quote
  #3  
Old March 24th, 2006, 10:59 AM
samh5792 samh5792 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 8 samh5792 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 30 m 52 sec
Reputation Power: 0
Your amended code doesn't error, but...

Quote:
Originally Posted by badukist
You need :
begin
for select constituentID,CT_Code,Inactive_YN from constituents
into :constituentID,:CT_Code,:Inactive_YN do
begin
suspend;
end
end^

for multiple rows select

====== sam hunt wrote ====
but... I only get one row in IBOConsole and there are 6 rows in the single table that this select procedure queries. PLUS, I get an "arithmetic error..." when I attempt to navigate the dataset in my application.
Any more help?
Thx
Sam

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Error: multiple rows in singleton select


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT