NHibernate: Stored procedure parameter issue
Posted: Fri 12 Oct 2012 09:21
Using Entity Developer 4.7 with NHibernate 3.3.1 and SQL Server 2008 (dialect=NHibernate.Dialect.MsSql2008Dialect) I want to call stored procedures.
The generated command in the <sql-query> element of the hbm.xml file contains a call syntax which is not accepted by NHibernate.
I get sth like this:
I would expect a syntax without parentheses.
NHibernate returns an error like this:
What am I doing wrong?
The generated command in the <sql-query> element of the hbm.xml file contains a call syntax which is not accepted by NHibernate.
I get sth like this:
Code: Select all
exec dbo.MyProc(:Param1, :Param2)
NHibernate returns an error like this:
Code: Select all
[SQL: exec dbo.MyProc(@p0, @p1)] ---> System.Data.SqlClient.SqlException: Incorrect syntax near '@p0'.