|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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(?)>" |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
||||
|
||||
|
See beginners filling dataset using stored procedure from www.dotnetfirebird.org (mentioned in the "resources" thread on top of this forum)
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > FBDataReader and Stored procedure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|