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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:59:56+00:00 2026-05-16T01:59:56+00:00

This question is regarding the ASP.NET webservice that i am creating using the DAL-BLL

  • 0

This question is regarding the ASP.NET webservice that i am creating using the DAL-BLL architecture for my final school project.

I have a stored procedure, which is a select query with an inner join for 2 tables. Hence the stored procedure returns multi-table value. One of my DAL tableAdapter methods accesses this stored procedure. How do i retrieve the return value in the BLL? Do i have to create a class structure similar to the one supposed to be returned by the stored proc? or is there a direct way to achieve the same? Help greatly appreciated. Please let me know if someone needs code applet to get a better understanding. Thanks

Here is some more information:
I am using the SQL dataset (.xsd) in DAL. So i have a datatable called “Insurance”, which has a tableAdapter. One of the queries in the adapter references to a stored procedure, which has an inner join. So my SP looks like:

ALTER PROCEDURE dbo.GetInsurancesPaged
    (
        @startRowIndex int,
        @maximumRows int,
        @patientID int
    )
AS
    select * from
    (
    SELECT Insurance.insuranceID, Insurance.memberID, Insurance.groupID, Insurance.accountType, Insurance.comments, Insurance.patient, Insurance.company, InsuranceCompany.companyID, InsuranceCompany.companyName, InsuranceCompany.address, InsuranceCompany.phone, InsuranceCompany.fax, ROW_NUMBER() over (order by Insurance.dateModified DESC) as ROWRANK
FROM Insurance INNER JOIN InsuranceCompany ON Insurance.company = InsuranceCompany.companyID
WHERE Insurance.patient = @patientID
    )
    AS DataWithRowNumbers
WHERE ROWRANK > @startRowIndex AND ROWRANK <= (@startRowIndex + @maximumRows)

So this SP returns a datatable which will be a combination of the 2 tables in the inner join. Please correct me if i am wrong.

Now in my BLL, i have:

[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
    public mySys.InsuranceDataTable GetInsurancesPaged(int startRowIndex, int maximumRows, int patientID)
    {
       return insAdapter.GetInsurancesPaged(startRowIndex, maximumRows, patientID);
    }

where insAdapter is an instance of insuranceTableAdapter

This gives an error on execution. I can execute the SP successfully, so i think the problem is only bcz i am trying to return a wrong datatable from the BLL.
Please help me solve this.

  • 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-16T01:59:57+00:00Added an answer on May 16, 2026 at 1:59 am

    Found a solution 🙂
    Finally got it working.

    I created a new table adapter using the Dataset designer, and called the SP as one of the queries there. The datatable thus created, has all the fields (from Insurance and InsuranceCompany) included. Now, ASP.NET can detect that the return type is the newly created datatable.
    Works like a charm.

    If there is a better way to solve this, please comment.

    Thank you all for your time.

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

Sidebar

Related Questions

This is regarding ASP.NET MVC. Let's say I have a web site that is
I asked this question regarding a strange behaviour from a GridView control in ASP.Net
This question relates to ASP.NET MVC3 using the Razor Engine. What I need to
I know this question has been handeled in similar situations, regarding ASP.Net, before. But
Sorry, another super basic ASP.NET question. this so embarrassing. I am reading the article
Yesterday I posted this question regarding using lambdas inside of a Join() method to
I have a question regarding the ASP.NET 3.5 Treeview and Treenodes. I'd like to
My question is regarding Page Routing in an ASP.net (VB) Web Forms website. I
I'm writing a simple blogging platform with ASP.NET MVC. My question is regarding forms
I am new to ASP.NET MVC and I have a question regarding viewing entity

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.