Problem accessing SQL Stored Procedure From .Net using hibernate object

Hi,
I am calling a SQL Stored procedure from .net application using Hibernate object, but somehow its telling me "The 'callable' attribute is not declared.",
I am not sure what's wrong I have done here.

Will really appreciate if someone can help me for this.
Herewith I am providing my Stored Procedure, my .hbm file and code to call it.

can someone pls tell me what's wrong in this?
Also, if possible, pls tell me how to set result in a list object.

Thanks in advance,


#########################################
MY STORED PROCEDURE :


ALTER PROCEDURE [dbo].[RulesDetails_Get]
(
@ELAID INT ,
@FamilyID INT ,
@GroupID INT ,
@SubGroupID INT ,
@ItemComponentID INT ,
@ComponentID INT
)
AS
BEGIN

SELECT
QtyAlreadyOrdered_Component,
QtyAlreadyOrdered_Family,
QtyAlreadyOrdered_Group ,
QtyAlreadyOrdered_SubGroup,
QtyAlreadyOrdered_ELA ,

MaxQtyAllowed_Component ,
MaxQtyAllowed_Family ,
MaxQtyAllowed_Group ,
MaxQtyAllowed_SubGroup ,
MaxQtyAllowed_ELA ,

QtyBalanceAvailable_Component,
QtyBalanceAvailable_Family,
QtyBalanceAvailable_Group,
QtyBalanceAvailable_SubGroup,
QtyBalanceAvailable_ELA
FROM
MyTable1
WHERE
ELAID = @ELAID
AND
FamilyID = @FamilyID



#########################################


#########################################
MY .HBM FILE FOR THIS STORED PROCEDURE:


<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" >


<sql-query name="RulesDetails_Get" callable="true">
<return class="RulesDetails_Get">
<return-property name="QtyAlreadyOrdered_Component" column="QtyAlreadyOrdered_Component"></return-property>
<return-property name="QtyAlreadyOrdered_Family" column="QtyAlreadyOrdered_Family"></return-property>
<return-property name="QtyAlreadyOrdered_Group" column="QtyAlreadyOrdered_Group"></return-property>
<return-property name="QtyAlreadyOrdered_SubGroup" column="QtyAlreadyOrdered_SubGroup"></return-property>
<return-property name="QtyAlreadyOrdered_ELA" column="QtyAlreadyOrdered_ELA"></return-property>

<return-property name="MaxQtyAllowed_Component" column="MaxQtyAllowed_Component"></return-property>
<return-property name="MaxQtyAllowed_Family" column="MaxQtyAllowed_Family"></return-property>
<return-property name="MaxQtyAllowed_Group" column="MaxQtyAllowed_Group"></return-property>
<return-property name="MaxQtyAllowed_SubGroup" column="MaxQtyAllowed_SubGroup"></return-property>
<return-property name="MaxQtyAllowed_ELA" column="MaxQtyAllowed_ELA"></return-property>

<return-property name="QtyBalanceAvailable_Component" column="QtyBalanceAvailable_Component"></return-property>
<return-property name="QtyBalanceAvailable_Family" column="QtyBalanceAvailable_Family"></return-property>
<return-property name="QtyBalanceAvailable_Group" column="QtyBalanceAvailable_Group"></return-property>
<return-property name="QtyBalanceAvailable_SubGroup" column="QtyBalanceAvailable_SubGroup"></return-property>
<return-property name="QtyBalanceAvailable_ELA" column="QtyBalanceAvailable_ELA"></return-property>


</return>
{ call RulesDetails_Get(?,:ELAID, ?,:FamilyID, ?,:GroupID, ?,:SubGroupID, ?,:ItemComponentID, ?,:ComponentID) }
</sql-query>

</hibernate-mapping>



#########################################


#########################################
MY CODE TO CALL STORED PROCEDURE :
NHibernate.ISession hibSession = null;

hibSession = getHibSession();


IQuery q = hibSession.GetNamedQuery("RulesDetails_Get");

q.SetParameter("ELAID", 7);
q.SetParameter("FamilyID", 28);
q.SetParameter("GroupID", 79);
q.SetParameter("SubGroupID", 219);
q.SetParameter("ItemComponentID", 584);
q.SetParameter("ComponentID", 563);

q.List();

#########################################

0
niravparekh
12/12/2008 6:25:19 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

1 Replies
935 Views

Similar Articles

[PageSpeed] 2

 For help with NHibernate issues, you can also try http://forum.hibernate.org/viewforum.php?f=25


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
12/16/2008 12:39:15 PM
Reply:

Similar Artilces:

Problem with Oracle Stored Procedures using ODP.NET in VB.NET (VS 2003)
This is the stored procedure,Procedure RetrieveReservations(pProperty In Varchar2,pResHeaderId In Varchar2,pEmail In Varchar2,pPasswd In Varchar2,ResultSet In Out ResCursor);This is the old .asp code (part of it)objConn.ConnectionString = Application("BackEndConnection_ConnectionString")objConn.Open objComm.ActiveConnection = objConn objComm.CommandText = "internet_package.RetrieveReservations"objComm.CommandType = adCmdStoredProc objComm.Parameters.Append objComm.CreateParameter("pProperty", adVarChar , adParamInput, 8, Request.QueryString("propid"))objComm.Parameters.Append objComm.Crea...

.Net 2.0 Web application using Vb.net is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one ASP.net web application using Vb.net which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

How to transfer a GUID created using vb.net into a SQL database using a stored procedure
I am able to create a guid using: Public Function GetGUID() As String ' Returns a new GUID Return System.Guid.NewGuid.ToString End Function however when I try to add this to a parameter using the following: Me.cmdSpAddOptions.Parameters("@QuoteDetailID").Value = GetGUID() I get an error, I have also tried this: Dim uidQuoteDetail As String = GetGUID() Dim myuid = New System.Guid(uidQuoteDetail) Me.cmdSpAddOptions.Parameters("@QuoteDetailID").Value = myuid but get the error "Object must implement IConvertible" A...

How to Retrive the store procedure return value in Ado.Net by using Dot Net?
Hi i am thiru. i try to create the small search engine. so that i have wrote the store procedure for it. thats given below.Create procedure FindtestThree @Name varchar(25), @Location varchar(25), @EmpId varchar(25) as select * from TbInfo where Name like + '%' + @Name + '%' select * from TbInfo where Location like + '%' + @Location + '%' select * from hi where ComName like + '%' + @EmpId + '%' Exec FindtestThree 'aa','a','d' ----------------------------------------- The above procedure return t...

Problems accessing an Oracle stored procedure with c#.net
Can somebody please help me!! I've been trying to access an oracle stored procedure with OleDb for some time now. Is this even possible? Thanks in advance for any help, Ryan...

populating web form objects when using Visual Studio.NET
What is the best way of creating datasets for asp.net pages and populating web form objects. I have always created datasets within a sub routine and then populated my web form controls from that dataset. I was given some code that the pages were created in visual studio. I know the page gets its data from a stored procedure. What I can't find is code that calls that stored procedure and also populates the web form objects. Most of my asp.net development has been done on the asp.net page and not in Visual Studio. So if someone could tell me what to look for that would be great. Well, t...

Using sql Stored procedure from vb.net to output data
Can using a stored procedure from vb.net I get a report converted to xml for printing purposes.....ANy coding samples...

How do you enter Stored Procedures in VB.NET (Using Access DB)??
I'm using Microsoft Access 2003 and I'm using VB.Net. I'm trying to save a Stored Procedure for the application but when I enter the code into the SQL view of MS Access Query area it throws back errors. The Stored Procedure I'm trying to use is as follows:CREATE PROCEDURE dbo.CheckPassword(  @username Varchar(20)  @password Varchar(20))ASIf Exists(  Select User_ID from UserList Where User_Username = @username And User_Password = @password)Return 0 You must run the SQL command over oledb. You dont.  Microsoft Access Does not support Stored Procedures.  Yo...

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

saving .net DateTime to sql database using Stored Procedure...
Hello, I've read many posts on this, but not found any real answers. I have a web method that accepts a DateTime parameter, then writes this value back to a SQL database table.  Sql data type is "datetime" and the column accepts nulls. When the web service is called I get an error, "SqlTypeException: SqlDateTime overflow" or another error of similiar results.When I removed the database call and just write to a label or variable on the page, the web method works fine, but when it saves to the database, the error is thrown. Any ideas on how to handle...

Using ADO.NET Execute Second Stored Procedure Depending of Output of First Stored Procedure
When a user logs onto the app, I capture their UserId, today's date and thier WINNT using ADO.NET calling a stored procedue-no problem. Now, once the above mention fields have been populated, when the same user logs on again and this time click their daily attendance time, I need to execute and update stored procedure-no problem. Each time the user logs onto the attendance page, they need to be able to view the previuos time stamps, on page load.- no problem The problem is that I cannot get all three to work in concert, although they will work independently, somewhat. Sotred proc...

Permission problem with access database using vb.net web service
Hi all,I wrote a simple web service that has two public methods. It uses Access database. As long as the codes are accessing the database read only, it is fine. The methods can query data without having any problem. But when it comes to writing some data to database, I get "use an updatable query" error, which means the database is read only. But it is not read only because aspx pages can write data to it without having any problem. The folder and file permissions for database file is correct. When i googled the issue i found out that web services acce...

CR 9 for VS.NET PDF problems using web forms
Hi all. I am trying to capture patient history data then summarize the data in a one page report using Crystal Report. I would like to use Adobe Plug-in to alllow for printing the report (although printing from the browser will be acceptable). I am using the code straight off of the web site: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim myExportOptions As CrystalDecisions.Shared.ExportOptions Dim myDiskFileDestination As CrystalDecisions.Shared.DiskFileDestinationOptions Dim myExportFile...

a stupid problem in accessing the stored procedure from vb.net code :d
Edited by SomeNewKid. Please post code between <code> and </code> tags. Hi all knights of .NET Order.....plzz help a damsel in distress :d, I have written a lil Stored procedure that updates a field (called I_Status) in a table (called DCM_T_MessageHistory). I just need to know how to access this stored procedure through my vb.net code. The way that I can go is that I need to pass the information (there is just one input to the stored procedure called @p_I_MID. This input is actually the Employeed ID, a primary key field in DCM_T_MessageHistory table. ...

Web resources about - Problem accessing SQL Stored Procedure From .Net using hibernate object - asp.net.web-forms

Highest Percentage Of Opera Mini Users Accessing Facebook? Macau
If you were asked to guess which country had the highest percentage of users of Opera mobile Web browser Opera Mini users accessing Facebook ...

International Users Accessing Facebook Places Through US VPN Accounts
By using a virtual private network (VPN) hosted in the United States, Facebook users from around the world are accessing Facebook Places. The ...

What are some alternatives to Yodlee for accessing bank information?
Clay Loveless , Founder, Jexy. Co-founder, Mashery. Founder, Jexy. Co-founder, Mashery.

Cloud Console - Accessing files in cloud storage for iPad on the iTunes App Store
Get Cloud Console - Accessing files in cloud storage on the App Store. See screenshots and ratings, and read customer reviews.

Meryl Streep On Accessing The Characters Within - YouTube
Meryl Streep talks about the importance of an actors work representing their ability. CONNECT WITH AFI: http://facebook.com/AmericanFilmInstitute ...

Student pleads guilty to accessing records about Frances Abbott design scholarship
The Sydney student who leaked information about a fashion school scholarship controversially awarded to the daughter of the Prime Minister has ...

Accessing a headline opinion
Accessing a headline opinion

Sharp increase in authorities accessing private data
Australian law enforcement and government agencies have sharply increased their access without warrant to vast quantities of private telephone ...

Former librarian charged with accessing student records of Frances Abbott
A former part-time librarian at a Sydney design school has been charged after she allegedly accessed student records of Prime Minister Tony Abbott's ...

Frances Abbott scholarship: Sydney woman pleads guilty to accessing Whitehouse Institute records on PM's ...
A Sydney woman who leaked the student records of Tony Abbott's daughter pleads guilty. A Sydney woman who leaked the student records of Prime ...

Resources last updated: 1/22/2016 9:13:09 AM