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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:17:03+00:00 2026-05-20T21:17:03+00:00

I have a stored procedure in DBML and I try to pass the result

  • 0

I have a stored procedure in DBML and I try to pass the result to “sqlQryArray” as an array(1 dimensional array). But the bottom code causes error like below message. What else should be done?

Error 1 Value of type ‘1-dimensional array of aaaDatabase.stp_GetSomethingResult’ cannot be converted to ‘1-dimensional array of String’ because ‘aaaDatabase.stp_GetSomethingResult’ is not derived from ‘String’.

The return result from stored procedure is a just list of first names of students(only one column)

Dim sqlQry = aaaLINQ.stp_GetSomething(bbb,ccc,ddd)

Dim sqlQryArray As String() = sqlQry.ToArray()
  • 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-20T21:17:04+00:00Added an answer on May 20, 2026 at 9:17 pm

    Some background
    Once the stored procedure result has been returned, it is converted into a ISingleResult, which implements IEnumerable, and returned to the calling client. As ISingleResult is a generic class, an object with the same name as the sproc is created with the same properties as returned by the stored procedure.

    When using stored procedures they can only return items of type ISingleResult or IMultipleResult. This causes a number of problems when using the created objects. Firstly, in your client code you will have to manually convert the result to something like ToList() if you want to bind the objects to a data source. If you convert the objects to a list then they will not be change-tracked. Finally, you cannot benefit from deferred loading when using stored procedures as the call to the database is executed when the method is called.

    Read the complete article here: http://blog.benhall.me.uk/2008/05/linq-to-sql-stored-procedure-vs.html

    Check this too: a possible solution where you immediately re-map the result to your own POCO representation. You can also use a LINQ query to manipulate your result:

    LINQ to SQL: Stored Procedure Results

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

Sidebar

Related Questions

I have stored procedure which I will execute its result and pass it into
I have a stored procedure that returns a result set (4 columns x n
I have a Stored Procedure that takes parameters, but does not return anything. How
So, not sure what is happening. But I have stored procedure and it keeps
I have a linqtosql dbml where I dropped a stored procedure into the designer
I have stored procedure in my database and i need to look up a
I have a stored procedure in which if I write the following query without
I have a stored procedure which update a table based on such calculation and
I have a stored procedure in oracle which is using cursor.Its fetching the data
I have a stored procedure that has the parameter: @desk VARCHAR(50) I want to

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.