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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:19:47+00:00 2026-06-12T16:19:47+00:00

I have a data adapter with a method that that takes a variable and

  • 0

I have a data adapter with a method that that takes a variable and returns all entries that matches the variable:

e.g.

TableAdaptor ta = new TableAdaptor();
DataTable dt = ta.GetUserByUserID(UserID);

But I can’t for the life of me figure out how to return a single cell value from the method. Since it’s a strongly typed datatable, the column name becomes a property of the datatable so I can do:

dt.UserIDColumn.ToString();

But this returns the name of the column and not the value of the cell. And if I try:

dt.Rows[0]

there is no column property according to VS10’s intellisense. What am I missing here?

  • 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-12T16:19:48+00:00Added an answer on June 12, 2026 at 4:19 pm

    OK, I’m assuming you’re not really declaring a variable of type DataTable to hold your strongly typed data table, because as the base class, that won’t have all the strongly typed columns, etc.

    Try this:

    StronglyTypedDataTable dt = ta.GetUserByUserID(UserID);   
    StronglyTypedRow row = dt[0];
    var value = row.ColumnName;
    

    If memory serves, the strongly typed table will be indexable, and you’ll be able to access strongly typed data rows. Those will have strongly typed properties representing the individual cells, by name.

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

Sidebar

Related Questions

I have a base form class that contains a method that returns a DataTable:
I have a DataBaseHelper which has a fetchData() method that returns a Cursor containing
I have an object that reads data from an Excel file using, which takes
I have a ListView that is bound to a data adapter that displays distances
I have data like the following: var data = [{ id: 1, date: new
I have data-segment attribute in my body tag that is changed by a slider.
I have data from two different sources that I need to combine. Some data
I have a listview that's populated by rows that get their data from a
I am creating a client side swing app that will have data provided by/from
I have a web application that has a requirement to take data from an

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.