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

  • Home
  • SEARCH
  • 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 7808429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:08:00+00:00 2026-06-02T03:08:00+00:00

Using this technique, I’m pooling a large collection of records to be passed as

  • 0

Using this technique, I’m pooling a large collection of records to be passed as XML to a SQL Server (2008R2) proc from a .NET 4.0 app. The proc prepares the XML and joins against it using OPENXML (or at least will when I get it working).

When the code executes, .NET appears to correctly build the parameter and add it to the SQL command, but when it calls SQL Server, the SQL Profiler shows the parameter as null.

exec jcsdmp_UpdateMultiDocumentSendStatus @pUpdateStatusesXML=NULL

The calling code:

SqlParameter[] UpdateParams = new SqlParameter[1];
UpdateParams[0] = new SqlParameter("@pUpdateStatusesXML", SqlDbType.NText, sb.ToString().Length, sb.ToString());

SqlAccess.ExecuteNonQuery("docmgmt", "jcsdmp_UpdateMultiDocumentSendStatus", CommandType.StoredProcedure, UpdateParams);

And yes, I’ve been looking into the custom SqlAccess class (which largely checks parameters, opens connections, etc.–no real magic), but so far it looks like .NET thinks it’s sending the parameter…

Is there a size limit I might be missing or something along those lines?

  • 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-06-02T03:08:01+00:00Added an answer on June 2, 2026 at 3:08 am

    For the SqlParameter constructor overload you’re using, the fourth parameter is not the value but the source column.

    Have you tried using the constructor overload that accepts the value, and it will infer the type and size?

    UpdateParams[0] = new SqlParameter("@pUpdateStatusesXML", sb.ToString());
    

    You can explicitly set the SqlDbType after this if you need to (it may infer NVarChar):

    UpdateParams[0].SqlDbType = SqlDbType.NText;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am setting up a simple mobile/desktop redirect using the technique from this page
I've been using this technique for getting the absolute physical path of the running
I have another popups using this technique on the same page so it should
I am using this technique: is there a way to hold the values? -
I've been using this technique for over a year, but I haven't seen it
I've noticed other developers using this technique, but it always confused me. I decided
I built some cross fade rollovers in IE7 using this single image technique: http://jqueryfordesigners.com/image-cross-fade-transition/
I just come across this strange situation . I was using the technique of
First time using this technique, seems that regardless what attributes I try to assign
I am using this technique for a sticky footer: http://ryanfait.com/sticky-footer/ I wanted to create

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.