-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to call stored procedure of Firebird
PostPosted: Thu Jun 07, 2007 9:20 am 
Newbie

Joined: Thu Jun 07, 2007 9:07 am
Posts: 1
hello sir,
I have a stored proc [b]TESTSELECTSP [/b] written in firebird DB:
CREATE PROCEDURE TESTSELECTSP
RETURNS
(
VBOOKNAME VARCHAR(50),
VAUTHOR VARCHAR(50),
VPUBLICATION VARCHAR(50),
VPRICE INTEGER
)
AS
BEGIN
For Select BookName,Publication,Author,Price from Books
into :vBookName,vAuthor,vPublication,vPrice Do
Begin
suspend;
End END ^


I have the below code written for mapping,
[code]<sql-query name="_TESTSELECTSP">
<return class="TestNIHIBwithFireBird.BookDetails,TestNIHIBwithFireBird">
<return-property name="BOOKNAME" column="VBOOKNAME"/>
<return-property name="AUTHOR" column="VAUTHOR"/>
<return-property name="PUBLICATION" column ="VPUBLICATION"/>
<return-property name="PRICE" column ="VPRICE"/>
</return>
EXECUTE PROCEDURE TESTSELECTSP
</sql-query>[/code]

The code ive written to call the stored procedure is:
[code]Dim NamedQuery As IQuery = Session.GetNamedQuery("_TESTSELECTSP")
Dim list As IList = NamedQuery.List [b]'Exception comes here[/b]
If list.Count <> 0 Then
MessageBox.Show("Done")
End If[/code]

I get an error:
Cannot execute query [ EXECUTE PROCEDURE TESTSELECTSP]
I get IndexOutOfrangeException
"Could not find specified column in results."

I am totally stuck with this problem:
Please help me get out of this hell problem!!!

Regards

_________________
Shanand Chandradas


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.