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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:39:46+00:00 2026-05-14T22:39:46+00:00

I have this SP USE [Test] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON

  • 0

I have this SP

USE [Test]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[UsersInsert](@UpdatedProdData XML)
AS 
 INSERT INTO 
      dbo.UserTable(UserId,UserName,LicenseId,Password,PasswordSalt,Email,IsApproved,IsLockedOut,CreateDate,
      LastLoginDate,LastLockOutDate,FailedPasswordAttempts,RoleId)
      SELECT
         @UpdatedProdData.value('(/ArrayOfUsers/Users/UserId)[1]', 'uniqueidentifier'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/UserName)[1]', 'varchar(20)'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/LicenseId)[1]', 'varchar(50)'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/Password)[1]', 'varchar(128)'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/PasswordSalt)[1]', 'varchar(128)'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/Email)[1]', 'varchar(50)'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/IsApproved)[1]', 'bit'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/IsLockedOut)[1]', 'bit'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/CreateDate)[1]', 'datetime'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/LastLoginDate)[1]', 'datetime'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/LastLockOutDate)[1]', 'datetime'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/FailedPasswordAttempts)[1]', 'int'),
         @UpdatedProdData.value('(/ArrayOfUsers/Users/RoleId)[1]', 'int')

Now this SP creates just fine. It’s when I go to VS2010 and try to drag this SP in my method panel of my linq to sql file in design view.

It tells me that it can’t figure out the return type. I try to go to the properties but it does not have “none” as a choice and I can’t type it in. It should be “none” so how do I set it to “none”?

  • 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-14T22:39:47+00:00Added an answer on May 14, 2026 at 10:39 pm

    Is there any particular reason you absolutely have to call this from your Linq-to-SQL model??

    I would take the pragmatic approach:

    • Linq-to-SQL is great for retrieving, handling, updating single records or small sets of data
    • for bulk loads and/or stuff like this – why bother squeezing that into Linq-to-SQL?? Just new up a SqlConnection, a SqlCommand, and execute that stored proc….

    UPDATE: to call the stored proc from straight ADO.NET, you’d use the standard ADO.NET stuff as any programming book on .NET data access or ADO.NET tutorial (just Google for that!) will teach you:

    using(SqlConnection con = new SqlConnection(your-connection-string-here))
    {
         string sprocName = "UsersInsert";
    
         using(SqlCommand cmd = new SqlCommand(sprocName, con))
         {
             cmd.CommandType = CommandType.StoredProcedure;
    
             cmd.CommandType = System.Data.CommandType.StoredProcedure;
    
             SqlParameter param1 = new SqlParameter("@UpdateXml", SqlDbType.VarChar, int.MaxValue);
             param1.Value = YourXmlValueHere;
             cmd.Parameters.Add(param1);
    
             con.Open();
             int result = cmd.ExecuteNonQuery();
             con.Close();
         }    
    }
    

    Of course, you might want to wrap this into a try…catch block for exception handling and so forth – but that’s basically the code you’d need to call that stored proc using straight ADO.NET.

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

Sidebar

Related Questions

I have a string of test like this: <customtag>hey</customtag> I want to use a
I have attempted to use this CSS to set the width of my form
I have this SP USE [TestDB] GO /****** Object: StoredProcedure [dbo].[sp_test] Script Date: 06/12/2010
I have this .bat script which I use to maven package my application. Problem
I'm getting started on figuring out how to use RESTful design. I have this
I have my Windows Application that accepts args and I use this in order
I have downloaded the silver light from this http://www.microsoft.com/silverlight// I need to use this
I have a c++ header file containing a class. I want to use this
I have a dll that was written in c++, I need to use this
I have hit upon this problem about whether to use bignums in my language

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.