Hi,
I am using DataSets to populate some controls on my ASPX.
I retrieve some values using the Index in my DataSets.
For example dsTest.Tables[0].Rows[0].ItemArray[0] etc etc
How can I retrieve the value using the Column name /alias used in my SQL
rather than my Index.
Thanks,
Clive. 6 931
Just replace the index with the column name (i.e. ...Rows["SomeCol"]...).
"C" <C@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com... Hi,
I am using DataSets to populate some controls on my ASPX.
I retrieve some values using the Index in my DataSets.
For example dsTest.Tables[0].Rows[0].ItemArray[0] etc etc
How can I retrieve the value using the Column name /alias used in my SQL rather than my Index.
Thanks, Clive.
Use:
dsTest.Tables[0].Rows[0]["columnname"]
or
dsTest.Tables[0].Rows[0].Item["columnname"]
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
"C" <C@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com... Hi,
I am using DataSets to populate some controls on my ASPX.
I retrieve some values using the Index in my DataSets.
For example dsTest.Tables[0].Rows[0].ItemArray[0] etc etc
How can I retrieve the value using the Column name /alias used in my SQL rather than my Index.
Thanks, Clive.
dsTest.Tables[0].Rows[0]["FirstName"]
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"C" <C@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com... Hi,
I am using DataSets to populate some controls on my ASPX.
I retrieve some values using the Index in my DataSets.
For example dsTest.Tables[0].Rows[0].ItemArray[0] etc etc
How can I retrieve the value using the Column name /alias used in my SQL rather than my Index.
Thanks, Clive.
You still need the row index in there ;)
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Just replace the index with the column name (i.e. ...Rows["SomeCol"]...).
"C" <C@discussions.microsoft.com> wrote in message news:9A**********************************@microsof t.com... Hi,
I am using DataSets to populate some controls on my ASPX.
I retrieve some values using the Index in my DataSets.
For example dsTest.Tables[0].Rows[0].ItemArray[0] etc etc
How can I retrieve the value using the Column name /alias used in my SQL rather than my Index.
Thanks, Clive.
Actaully, it should be something like ...Rows[0]["SomeCol"]...
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Just replace the index with the column name (i.e. ...Rows["SomeCol"]...).
"C" <C@discussions.microsoft.com> wrote in message news:9A**********************************@microsof t.com... Hi,
I am using DataSets to populate some controls on my ASPX.
I retrieve some values using the Index in my DataSets.
For example dsTest.Tables[0].Rows[0].ItemArray[0] etc etc
How can I retrieve the value using the Column name /alias used in my SQL rather than my Index.
Thanks, Clive.
dsTest.Tables[0].Rows[0]["ColumnName"]
--
Gregory A. Beamer
MVP; MCP: +I, SD, SE, DBA
*************************************************
Think outside the box!
*************************************************
"C" <C@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com... Hi,
I am using DataSets to populate some controls on my ASPX.
I retrieve some values using the Index in my DataSets.
For example etc etc
How can I retrieve the value using the Column name /alias used in my SQL rather than my Index.
Thanks, Clive. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: William Ryan |
last post by:
At the risk of sounding like a Big 5 consultant, "It
depends".
1) Strongly typed datasets rock, they are faster than
untyped, use intellisense... but your reason for
wanting to use them is...
|
by: Alpha |
last post by:
I have a small Window application and through out the different forms I
create a different dataset. At the begining I used the Tools to drag and
drop the SqlDataAdapter, connection and dataset...
|
by: GaryDean |
last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much
in answers so I'm reposting some questions posted by some of the programmers
here in our organization that never got...
|
by: Luqman |
last post by:
Is it recommended to use datasets in ASP.Net 2.0 / VS.Net 2005 ?
Best Regards,
Luqman
|
by: Ronald S. Cook |
last post by:
I've always used untyped datasets. In a Microsoft course, it walks through
creating typed datasets and harps on the benefits. It has you drag all
these things around ..wizard, wizard, wizard......
|
by: Penelope Dramas |
last post by:
Hello,
I'm in a front of very serious .net redesign/rewrite of an old VB6
application.
I had been asked to make it .NET 2.0 and would like to ask couple of
questions regarding data access as...
|
by: S.Tedeschi |
last post by:
Hi all gurus.
I'm trying to switch to VS 2005, from VS 2003. I've an ASP.NET 1.1 app
heavily relying on StronglyTyped DataSets, with lots of FindByKey...,
dataSet.Tablename, and similar methods....
|
by: S.Tedeschi |
last post by:
Hi all;
as posted some days ago, I'm converting an on-line app; I used to
heavily rely on strongly-typed DataSets directly dropped onto pages,
and so viewed by code(-behind) as well. In the next...
|
by: BillE |
last post by:
I'm trying to decide if it is better to use typed datasets or business
objects, so I would appreciate any thoughts from someone with more
experience.
When I use a business object to populate a...
|
by: gardnern |
last post by:
We have X number of data sets, of Y length each.
For example...
Small, Medium, Large
and
Red, Green, Blue, Yellow
We need to generate a list of all possibilities
Small Red
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |