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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:48:34+00:00 2026-06-18T11:48:34+00:00

I was looking for a way to extract data from a SqlDataSource object within

  • 0

I was looking for a way to extract data from a SqlDataSource object within VB.NET code but looking at the code I found for this leads me to believe that the select statement is executed once again during the DirectCast.

Does anyone know if this usage causes an additional select statement to be run even though the SqlDataSource has already run previously?

The post I got this from is here: How can i iterate through row of particular table associated with SqlDataSource control in VS 2008?

Here is the code:

Dim datareader = DirectCast(SqlDataSource2.[Select](DataSourceSelectArguments.Empty), SqlDataReader)

While datareader.Read()        
     Label2.Text = datareader("LastName").ToString()
End While
datareader.Close()
  • 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-18T11:48:35+00:00Added an answer on June 18, 2026 at 11:48 am

    A data reader will read from the source.

    If the source is a database, then the reader will read from the database every time you call Read().

    It is unclear to me what your DirectCast is there for or why you are using it.

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

Sidebar

Related Questions

I am looking for a way to extract / scrape data from Word files
I'm looking for a clever way to extract 500 plus lines of data from
I'm looking for a way to extract data from a jar file. What i
I'm looking a way to enable IP logging with log4net in ASP.NET. I found
I am looking for a way to extract the options, from a HTML select
I am looking for a way to extract/get values from an array and assign
I'm looking for a way to extract the computer SID using Delphi code. There's
I'm trying to extract data from a many to many table configuration. I'm sorry
I am looking for a convenient way to export every images found in an
I have the following data frame from which I would like to extract rows

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.