473,496 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

get by colom name

hi;

i fill my dataset from sql server by adaptor automatically...

i want to retrive any element in my data row by colom name...

let say i have a datatable like

ID NAME SURNAME
1 sadun sevingen
2 cem sevingen

this code is not valid but lets say i want to take first row.. then i want
to do it like someting below...

DataSet.Tables[0].Rows[0].Item["NAME"] // which is "sadun"

Nov 16 '05 #1
3 2424
What is wrong with the line of code you have written. Look OK to me.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
Sadun Sevingen wrote:
hi;

i fill my dataset from sql server by adaptor automatically...

i want to retrive any element in my data row by colom name...

let say i have a datatable like

ID NAME SURNAME
1 sadun sevingen
2 cem sevingen

this code is not valid but lets say i want to take first row.. then i want
to do it like someting below...

DataSet.Tables[0].Rows[0].Item["NAME"] // which is "sadun"


Nov 16 '05 #2
Hi,

Try:

DataSet.Tables[0].Rows[0]["NAME"]
Item is the indexer.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Sadun Sevingen" <b-saduns@ms> wrote in message
news:eU*************@TK2MSFTNGP12.phx.gbl...
hi;

i fill my dataset from sql server by adaptor automatically...

i want to retrive any element in my data row by colom name...

let say i have a datatable like

ID NAME SURNAME
1 sadun sevingen
2 cem sevingen

this code is not valid but lets say i want to take first row.. then i want
to do it like someting below...

DataSet.Tables[0].Rows[0].Item["NAME"] // which is "sadun"


Nov 16 '05 #3
that worked thanks...
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

Try:

DataSet.Tables[0].Rows[0]["NAME"]
Item is the indexer.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Sadun Sevingen" <b-saduns@ms> wrote in message
news:eU*************@TK2MSFTNGP12.phx.gbl...
hi;

i fill my dataset from sql server by adaptor automatically...

i want to retrive any element in my data row by colom name...

let say i have a datatable like

ID NAME SURNAME
1 sadun sevingen
2 cem sevingen

this code is not valid but lets say i want to take first row.. then i
want
to do it like someting below...

DataSet.Tables[0].Rows[0].Item["NAME"] // which is "sadun"



Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
63607
by: stewart.midwinter | last post by:
No doubt I've overlooked something obvious, but here goes: Let's say I assign a value to a var, e.g.: myPlace = 'right here' myTime = 'right now' Now let's say I want to print out the two...
2
2722
by: Ravi | last post by:
My XML looks like: <abc> <def type="apple"> 1 </def> <def type="peach"> 2 </def> <def type="orange"> 3 </def> <def type="banana"> 4 </def> <def type="plum"> 5 </def> </abc>
1
2614
by: discomiller | last post by:
Mario Mueller: Hello *, radiobuttons belong to other radiobuttons by the "name="any_value"" attribut. Thats a fakt. I got the following XML:...
21
11335
by: TheKeith | last post by:
I heard that the name attribute is deprecated in html 4.01 strict. Is it recommended that you use the ID attribute for images along with the getElementById method instead of the old way? Thanks.
12
2436
by: CJ | last post by:
Why won't this work? I am passing the name of the form (I have two that use this validation script) but I keep getting an error. Error reads: "document.which_form.name is null or not an object" ...
11
3000
by: Andrew Thompson | last post by:
I have written a few scripts to parse the URL arguments and either list them or allow access to the value of any parameter by name. <http://www.physci.org/test/003url/index.html>...
1
5034
by: Prasad Karunakaran | last post by:
I am using the C# DirectoryEntry class to retrieve the Properties of an user object in the Active Directory. I need to get the First Name and Last Name as properties. I know it is not supported...
1
5980
by: ivanet | last post by:
Hello everyone, I am trying to use the following Schema but I get the error "src- resolve: Cannot resolve the name 'ValuesList' to a(n) 'element declaration' component." at line 144. I have...
0
6991
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...
0
7160
Oralloy
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,...
1
6878
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...
0
7373
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
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,...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3088
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...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.