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 May 31st, 2006, 05:43 AM
Dharshan Dharshan is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 1 Dharshan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 47 sec
Reputation Power: 0
FBDataReader and Stored procedure

Hi All,

I have 2 ques for u all.
1. I dint find any example to retrive data from a stored procedure using FBDataReader provided my Firebird.NET DATA PROVIDER.
2. How to programatically get results of "SELECT * FROM <Stored Procedure(?)>"

Reply With Quote
  #2  
Old January 16th, 2007, 06:10 PM
jwbartle jwbartle is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Posts: 20 jwbartle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 40 m 10 sec
Reputation Power: 0
I believe I'm having the same problem as you are. But just in case your English is bad enough that I am mistaken, I'll state my problem anyway.

In C#.NET, I have an FbDataReader set up to (obviously) read data I get back from a call to the database. It gets back the results from a normal select query perfectly fine, but when I try to call a stored procedure which returns a single numeric value, I don't get anything back. I have it set to throw up a message box displaying the value from the first field it gets back. When I have a query which essentially does the same thing as the procedure, it gives me the correct result. When I try to display the return value of a stored procedure, it gives an error message like "No Data to be read".

I know that the procedure works perfectly fine within itself, since when I execute the procedure in something like IB-Expert, it tells me "<PROCEDURE NAME> = <OUTPUT>". When I build the FbCommand string, I do it just as a normal query. Instead of a "SELECT....FROM...", I set it to "EXECUTE PROCEDURE TEST_PROCEDURE(100800)" ('100800' is the parameter passed to it in this test case).

In the end, I could just do it all the query way if I needed to, but I'd prefer to use stored procedure.

Reply With Quote
  #3  
Old January 17th, 2007, 05:28 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
See beginners filling dataset using stored procedure from www.dotnetfirebird.org (mentioned in the "resources" thread on top of this forum)

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > FBDataReader and Stored procedure


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 5 hosted by Hostway
Stay green...Green IT