What is the best way to read single field values from a dataset? The dataset
is populated with a customer record, showing well in a gridview. But I also
want to read the single field values, like adress, phone, and so on.
Bjorn 3 2701
On Oct 7, 7:42 pm, "Bjorn Sagbakken" <bjo-...@online.nowr ote:
What is the best way to read single field values from a dataset? The dataset
is populated with a customer record, showing well in a gridview. But I also
want to read the single field values, like adress, phone, and so on.
Bjorn
for example, myDataSet.Table s[0].Rows[0][0]
it gives you a value of the first colum in the first row
"Alexey Smirnov" <al************ @gmail.comwrote in message
news:11******** *************@o 80g2000hse.goog legroups.com...
On Oct 7, 7:42 pm, "Bjorn Sagbakken" <bjo-...@online.nowr ote:
>What is the best way to read single field values from a dataset? The dataset is populated with a customer record, showing well in a gridview. But I also want to read the single field values, like adress, phone, and so on.
Bjorn
for example, myDataSet.Table s[0].Rows[0][0]
it gives you a value of the first colum in the first row
Thanks a lot. That was exactly what I was looking for.
Bjørn
Is it a strong or weak typed DataSet?
Let's say you have
EmployeeDS
with one table : Employee
and 3 columns
EmployeeID (int) , LastName (string) , FirstName (string)
Here is some pseudo code:
EmployeeDS ds = new EmployeeDS();
ds.Employee.Add NewEmployeeRow ( 101, "Smith" , "John") ;
.........
EmployeeDS.Empl oyeeRow row = ds.Employee.Row s[0] as EmployeeDS.Empl oyeeRow;
// friendly cast
if(null!=row)
{
int empid = row.EmployeeID;
}
"Bjorn Sagbakken" <bj*****@online .nowrote in message
news:69******** *************@t elenor.com...
What is the best way to read single field values from a dataset? The
dataset is populated with a customer record, showing well in a gridview.
But I also want to read the single field values, like adress, phone, and
so on.
Bjorn This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Randell D. |
last post by:
HELP!
I am determined to stick with this... I'm getting there... for those who
haven't read my earlier posts, I'm createing what should be a simple
function that I can call to check that required fields in a form have
values. I'm writing the values to the client using document.write only so
that I can confirm that the values are there to be played with - this is not
the final result so please (unless it's leading to the script failure)...
|
by: Bill |
last post by:
I have a seating chart web form that has over 50 entry field controls
(tables/booths) where I use a DropDownList box to select a single company
name from a single large list of organizations (200 plus conference
attendees). All web form datavalues will be one of the same 200
organizations in this list. I would like to avoid creating 50 separate exact
copies of the same DataSet object. Can you help?
Q. Exactly how do I use the same...
|
by: Scott M. Lyon |
last post by:
I've just discovered a bug in some code I wrote a little while ago, and I
need you guys' help to fix it.
My program imports data from a standard Excel Spreadsheet (just with
specific column headers). I used ODBC in my VB.NET program to read that
spreadsheet into a dataset, to make it easy to manipulate. The code I use to
read it is as the bottom of this posting.
|
by: Amit Maheshwari |
last post by:
I need to read text file having data either comma seperated or tab seperated
or any custom seperator and convert into a DataSet in C# .
I tried Microsoft Text Driver and Microsoft.Jet.OLEDB.4.0 to read text file
but could not get the data in correct format.
All columns are not coming in dataset and rows are messing up.
Suggestions please ???
|
by: BMeyer |
last post by:
I have been losing my mind trying to parse an XML document (with nested child
elements, not all of which appear in each parent node) into a DataGrid
object. What I want to do is "flatten" the XML document into a text
document with a single row for each parent node (that has all of the values
from all of the child nodes for that row)
The DataView within VS 2005 IDE displays my 15 or so child tables - and
knows that some parent rows...
| |
by: OscarPiacenza |
last post by:
Hello all. :)
My name is Oscar and I’m a novice on XML and dataset arguments.
I need some help to resolve (and understand :) ) the following problem:
I have stored some data in a SqlServer database. I read data stored in database using a DbDataAdapter which fill a dataset.
One of the columns DataType of the dataset is a System.Byte containing an array of bytes. (In the SqlServer database it is stored as VarBinary field).
For...
|
by: Anish G |
last post by:
Hi,
I have an issue with reading CSV files.
I am to reading CSV file and putting it in a Datatable in C#. I am using a regular expression to read the values. Below is the code. Now, it reads CSV file without any issues only if all the fields are not null. If any field is blank, it moves the values to the left and displays the value under invalid column.
Example is shown below:
A part of CSV file.
I am reading the first row as...
|
by: sweetiecakes |
last post by:
Simple Googling only results filling controls with information -- not
this. The scenario is, that I have a whole table in my dataset. I know
the ID (autoincrementing integer field) of the row to grab data from in
the dataset. How do I get all the data of that row in the dataset?
|
by: sachinkale123 |
last post by:
Hi,
I am reading excel file and reading values from that
I am using provider As : "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " + Filename + ";Extended Properties=\"Excel 8.0;Hdr=No;IMEX=1\"";
Column Name 'Sol 1' and 'Sol 2' is missing even though it is reading the readings. Just not able to read column names.
I am not sure about what is exact problem. so please help me in solving this.
Thanx in advance.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |