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 6999015
In Process

The Archive Base Latest Questions

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

I’m using a user defined table type to pass into my stored proc. I’ve

  • 0

I’m using a user defined table type to pass into my stored proc.
I’ve had cause to change the table type to add an extra column, and now I get the error:

The parameter “@MyParam” is not the same type as the type it was
created with. Drop and recreate the module using a two-part name for
the type, or use sp_refreshsqlmodule to refresh its parameters
metadata.

when calling the proc from my .net code.
I am adding the param value to my command like so:

var param = _command.Parameters.AddWithValue("@MyParam" , myTypedDataTable)
param.SqlDbType = SqlDbType.Structured;

where myTypedDataTable has been updated to contain the new column.

I have tried dropping and recreating the stored proc that is called, as well as dropping and recreating the User Defined Table.

I have also (thanks to Google) tried to use sys.sp_refreshsqlmodule on my Stored Proc and User Defined Table (It did not work however, on the User Defined Table, giving me the error: “Could not find object ‘[myUserDefinedTable]’ or you do not have permission.”, I beleieve this may be due to sys.sp_refreshsqlmodule not being able to work on user defined tables?)

I think I am probably missing something basic here, but can’t see what?

  • 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-27T20:29:11+00:00Added an answer on May 27, 2026 at 8:29 pm

    I have found the error. There was another stored proc which relied on the user defined table which needed to be dropped and recreated. I’m surprised that this was missed, as when I tried to drop the user defined table first time around, It did not let me as the SP mentioned above referenced it (I had to drop the SP to remove the dependency, then drop the User Defined Table, and then recreate them both), yet it did not complain about a dependency for the newly found SP?

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

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.