Simple question -Dataset

  • Thread starter Thread starter John Carnahan
  • Start date Start date
J

John Carnahan

New to .net ....

I now have a dataset with one table in it name "MYTABLE"

1.) How do I read the value in the 3rd row, 2nd column of the current
rowstate?

myVal = ????.value

2.) How do I replace that value with a new value?

????.value = myNewValue

**** Just some rambling...
I've read six books, and spent hours looking through the SDK help, looking
through samples and another hour looking at the quick watch
to try to figure this SIMPLE thing out.
There are REAMS and REAMS of information, but a simple thing like this aught
to be the FIRST thing that pops up in the help about a dataset.
I now know how to XML it, REMOTE it, BIND it, TWIRL it, and SWIRL it (oh
ya), but coming from another OO language, I just want to know how
to READ and WRITE it! If I sound frustrated, I am. Is there a easy way to
find things in the help system? For example, coming from other languages,
you
pretty well know some of the basic things you want to do, i.e format a
string to a date, or find out if a file exist, read and write to a field,
etc. When you search the SDK help, with something like "FORMAT STRING" you
get a gazzillion things back, and little to do with what you are looking
for. If you know the syntax... i.e. String.Format
and type that in, then you find what you are looking for, but I don't know
the syntax, that's why I'm looking in the help sys.
 
John Carnahan said:
New to .net ....

I now have a dataset with one table in it name "MYTABLE"

1.) How do I read the value in the 3rd row, 2nd column of the current
rowstate?
myVal = dataset.Tables["MYTABLE"].Rows[2][1];

2.) How do I replace that value with a new value?
dataset.Tables["MYTABLE"].Rows[2][1] = myNewValue
 
When you search the SDK help, with something like "FORMAT STRING" you
get a gazzillion things back, and little to do with what you are looking
for. If you know the syntax... i.e. String.Format
and type that in, then you find what you are looking for, but I don't know
the syntax, that's why I'm looking in the help sys.

I've noticed this with every language I've learned.

Most of .NET is pretty consistent, though, and it hasn't had a chance yet to
be barnacled with backwards compatibility issues and design changes, so it's
not as bad as it could be (and, probably, will be).

I found that after about 3 or 4 months, I started to grok the patterns and
it came together much better.

Another thing that I've found helpful is to find some finished code for a
smallish app, and rewrite it line by line, putting your stamp on it, playing
with it until you understand it, then tearing it apart and improving it.

--Bob
 
Thanks Bob,
I know that every language I've learned, it's been a seemingly a steep
learning curve, but each new one, it seems steeper. It just takes time I
guess, patience, patience.
John
 
Back
Top