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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:19:46+00:00 2026-06-07T01:19:46+00:00

I have never learned this aspect of programming, but is there a way to

  • 0

I have never learned this aspect of programming, but is there a way to get each separate result of a excel query(using OleDB) or the likes.

The only way I can think of doing this is to use the INTO keyword in the SQL statement, but this does not work for me (SELECT attribute INTO variable FROM table).

An example would be to use the select statement to retrieve the ID of Clients, and then compare these ID’s to clientID’s in a client ListArray, and if they match, then the clientTotal orders should be compared.

Could someone prove some reading material and/or some example code for this problem.
Thank you.

  • 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-06-07T01:19:48+00:00Added an answer on June 7, 2026 at 1:19 am

    This code fetches rows from a sql procedure. Will probably work for you too with some
    modifications.

            using (var Conn = new SqlConnection(ConnectString))
            {
                Conn.Open();
                try
                {
                    using (var cmd = new SqlCommand("THEPROCEDUREQUERY", Conn))
                    {
                        cmd.CommandType = CommandType.StoredProcedure;
    
                        SqlDataReader reader = cmd.ExecuteReader();
                        // Find Id of column in query only once at start
                        var Col1IdOrd = reader.GetOrdinal("ColumnName");
                        var Col2IdOrd = reader.GetOrdinal("ColumnName");
                        // loop through all the rows
                        while (reader.Read())
                        {
                            // get data for each row
                            var Col1 = reader.GetInt32(ColIdOrd);
                            var Col2 = reader.GetDouble(Col2IdOrd);
                            // Do something with data from one row for both columns here
                        }
                    }
                }
                finally
                {
                    Conn.Close();
                }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have never come across this issue but most recently I noticed that a
I have been programming in Java for a while, but have never dealt with
I've been using javascript for a while, but have never learned the language past
I have never programmed a gadget for Vista or Seven, but I would like
I have never thought about until recently, but I'm not sure why we call
I have never used Perl, but I am really impressed by the ack ,
I have never really done much C but am starting to play around with
this is something I have always had confusion about I never can seem to
This is one of those things I learned a long time ago and never
Disclaimer: I'm not a programmer, never was, never learned algorithms, CS, etc. Just have

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.