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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:26:57+00:00 2026-05-24T17:26:57+00:00

I have a SP with 20 select queries. Each query is table-name-aliased like below.

  • 0

I have a SP with 20 select queries. Each query is table-name-aliased like below.

Create procedure sp_get_all_lists
 as
 begin
   select col1, col2 from tb_ nm as name
   select col1, col2 from tb_ctry as country
   select col1, col2 from tc_cty city
    .
    .
    .
   select col1, col2 from tb_prfl as profile
  end

I need to bind all the data to dropdown lists in ASP.NET C# web page. While binding, if the query is executed, the DataTable array in DataSet, have the names as Table1, Table2… etc. I need the datatables to bear the alias names i gave in the SP.

This would help me bind the dropdowns as

ddCtry.DataSource = ds.Tables["country"];

Currently am doing it as ddCtry.DataSource = ds.Tables[1];

Could someone help me to get the table-alias name in C# code.

Thanks in advance.

  • 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-24T17:26:58+00:00Added an answer on May 24, 2026 at 5:26 pm

    There is no way to do this (as of .NET 4.0) See the “Multiple Result sets” sections of:
    http://msdn.microsoft.com/en-us/library/bh8kx08z.aspx

    and also this question:
    set the result table name in stored procedure

    You could try using Linq

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

Sidebar

Related Questions

So i have a mysql query that queries a table contacts each contact then
I have to queries: select id, name, num from pending id, name, num 1,
I have 2 queries. First: SELECT * FROM `table` WHERE col='xyz' LIMIT 100 //Time
I have two mysql queries: $sql = SELECT * FROM content WHERE threadName LIKE
I have two queries, as following: SELECT SQL_CALC_FOUND_ROWS Id, Name FROM my_table WHERE Name
I have a lot of SQL queries like this: SELECT o.Id, o.attrib1, o.attrib2 FROM
I have a query to select from another sub-query select. While the two queries
Please look at this query. select name form table Let suppose this returns 100
Suppose I have a query like this: SELECT s.staffID as staffID, CONCAT_WS(, , lname,
We have a lot of queries select * from tbl_message that get stuck on

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.