473,383 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

call a specific element of DataSet

Hi

It is possible to call a specific element of a DataSet? I couldn't figure
out it yet.

I tried to use the following code but obviously it doesnt work. Hope you can
help me!

foreach(DataTable myTable in myDataSet.Tables)
{
foreach(DataRow myRow in myTable.Rows)
{
_oper = myTable.Columns("ID");
_process = myTable.Columns("Process");
dbInsert(_oper, _process);
}
}

thks a lot for u r help!
Francoise
Apr 25 '06 #1
1 1197
Francoise,
provided that
_oper and _process have been cast correctly, e.g.:

string _oper = (string)myTable.Columns("ID");

I do not see anything wrong with your code. However it "looks" like you are
attempting to do what a DataAdapter does in it's Update method.
Peter
_-- Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Francoise" wrote:
Hi

It is possible to call a specific element of a DataSet? I couldn't figure
out it yet.

I tried to use the following code but obviously it doesnt work. Hope you can
help me!

foreach(DataTable myTable in myDataSet.Tables)
{
foreach(DataRow myRow in myTable.Rows)
{
_oper = myTable.Columns("ID");
_process = myTable.Columns("Process");
dbInsert(_oper, _process);
}
}

thks a lot for u r help!
Francoise

Apr 25 '06 #2

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

Similar topics

1
by: Andrew Poulos | last post by:
I'm dynamically building some html OBJECT code and I use this function to and PARAM elements: // function to add a PARAM element to an element (parent, name, value) addParam = function(prt,n,v)...
5
by: Paul Nations | last post by:
I'm in a real pickle. I've inherited a project with major problems. It receives encrypted XML files from a website not under my control (so I can't modify the web app) for insertion into a...
2
by: Json | last post by:
Ok, brand new to SQLXML 3.0 and its various issues. Heres what I'm trying to do: 1. I am trying to load xml data into an empty SQL table from my .NET console application. 2. This isn't a huge...
3
by: David M | last post by:
When using a dataset, how can one get to a column data element using this format: dataset.Tables.Rows.... I can get to a specific row, but I am not sure how to get to the column or data. I...
9
by: Stephen | last post by:
OK, I have filled a DataSet with an SqlDataAdapter and I just want the data in one column of one row. How can I do this since the following gives me the infamous 'Object reference not set to an...
1
by: ronchese | last post by:
Hello All. I need to complement some information in a xml file, using the Xml.XmlDocument object. This xml contains several <xs:element ....> nodes (is a saved dataset), and I need to write new...
0
by: lvpaul | last post by:
Hello ! I am calling a .NET Webservice and getting back a ADO.NET Datatset. How can I convert this to an PHP-Array ? $ergebnis = $m_service->call( $function, $data ); print_r($ergebnis)...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
3
by: deciacco | last post by:
I'm using an object that has a dataset within it. When the object is instantiated I populate the dataset from xml files. I want the object to save the dataset back to the xml file before it is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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 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.