0

In my config i have this: 'English (United States)' 1, 'Español (España)' 2

I'm executing a stored procedure that expect an int. I'm getting the exception: '...cannot convert nvarchar to int...' . Tha is because the substitution is not working. I never get 'English (United States)'replaced with 1

I'm doing parameter binding this way:

... string culture = "English (United States)"; IQuery query = NHibernateSession.GetNamedQuery(namedQuery) .SetString("IdiomId", culture) ...

Thnks and hope you can help me

1 Answers1

0

I think that you might have forgotton the equals

'English (United States)' 1, 'Español (España)' 2

Try Instead 'English (United States)'= 1, 'Español (España)'= 2

alternativly try looking at this question how-to-persist-an-enum-using-nhibernate

Community
  • 1
  • 1
Nathan Fisher
  • 7,961
  • 3
  • 47
  • 68