Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6947907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:45:11+00:00 2026-05-27T13:45:11+00:00

Because of some considerations I’m using an stored procedure to insert an entity in

  • 0

Because of some considerations I’m using an stored procedure to insert an entity in DB.
Some of my fields may have more than 4000 character length, but the query generated by NH declares some nvarchar(4000) variables to pass the value of the parameters.
Is there any way to set the length of the stored procedure parameter?
my parameter mapping is like this:

<query-param type="System.String" name="ArticleBody" />

When I set the length property in this tag like this:

<query-param type="System.String" name="ArticleBody" length="20000" />

I get this error:
“The type initializer for ‘News360.Common.Singleton`1’ threw an exception.”

Any help will be appreciated
Thanks & Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:45:12+00:00Added an answer on May 27, 2026 at 1:45 pm

    well the <query-param> element only supports type and name attributes.

    The real issue is that you are using the wrong type. In fact i think you are also declaring your types wrong. The type attribute expects the values are presented on the first column of the tables found at 5.2.2. Basic value types in the NHibernate reference.

    So, use StringClob instead of string (instead of System.String).

    cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a custom views, because some database fields are not
I'm trying run this procedure with generic parameters. If I can't delete because some
I am asking this here because I think my last question was more than
I ask because some of my users have made complaints that they want their
Because some email clients don't properly render external stylesheets (or even styles within the
The Groovy Process Management page mentions that: Because some native platforms only provide limited
We unfortunately find ourselves having to support our product in IE 6 because some
Asserts can't be caught. This is good because some errors I don't want to
Because of some apache rewrite rules in a project I'm working on, it's convenient
Because of some limitations ( example ) in the built-in ActionScript 3 Dictionary class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.