|
 |
aspx_beginners thread: Datasets driving me nuts
Message #1 by "Daniel Klemm" <daniel_klemm@b...> on Wed, 11 Sep 2002 13:09:51 +0100
|
|
All I want to do is access a value from the row of data is this to much to ask ?
I am new to .net but very familiar with classic asp.
In asp I would do this.
strMyVar = rsMyRecordSet("myCol")
In .net should I be doing something like this (I can't get any to work) ?
MyVar.Text = MyDataset.Tables("myTable").Rows("myCol")(0)
or
MyVar.Text = MyDataset.Tables("myTable").Rows(0)(0)
Any help would be very much appreciated and my stop me from going back to classic asp.
Daniel
Message #2 by Imar Spaanjaars <Imar@S...> on Wed, 11 Sep 2002 15:05:26 +0200
|
|
Hi Daniel,
Something like this should work:
MyDataset.Tables("myTable").Rows(0)("MyColumn")
This retrieves the value from column MyColumn from the first row.
If this doesn't work, post some more code. Maybe something else is wrong.
Also, post the error you're getting.
HtH
Imar
At 01:09 PM 9/11/2002 +0100, you wrote:
>All I want to do is access a value from the row of data is this to much to
>ask ?
>
>I am new to .net but very familiar with classic asp.
>
>In asp I would do this.
>
> strMyVar = rsMyRecordSet("myCol")
>
>In .net should I be doing something like this (I can't get any to work) ?
>
> MyVar.Text = MyDataset.Tables("myTable").Rows("myCol")(0)
>or
> MyVar.Text = MyDataset.Tables("myTable").Rows(0)(0)
>
>Any help would be very much appreciated and my stop me from going back to
>classic asp.
>
>
>Daniel
>
Message #3 by "Daniel Klemm" <daniel_klemm@b...> on Wed, 11 Sep 2002 14:14:40 +0100
|
|
Well done that man.
I was almost there.
Thanks
Daniel
----- Original Message -----
From: "Imar Spaanjaars" <Imar@S...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Wednesday, September 11, 2002 2:05 PM
Subject: [aspx_beginners] Re: Datasets driving me nuts
> Hi Daniel,
>
> Something like this should work:
>
> MyDataset.Tables("myTable").Rows(0)("MyColumn")
>
> This retrieves the value from column MyColumn from the first row.
>
> If this doesn't work, post some more code. Maybe something else is wrong.
> Also, post the error you're getting.
>
> HtH
>
> Imar
>
>
>
>
>
>
> At 01:09 PM 9/11/2002 +0100, you wrote:
> >All I want to do is access a value from the row of data is this to much
to
> >ask ?
> >
> >I am new to .net but very familiar with classic asp.
> >
> >In asp I would do this.
> >
> > strMyVar = rsMyRecordSet("myCol")
> >
> >In .net should I be doing something like this (I can't get any to work) ?
> >
> > MyVar.Text = MyDataset.Tables("myTable").Rows("myCol")(0)
> >or
> > MyVar.Text = MyDataset.Tables("myTable").Rows(0)(0)
> >
> >Any help would be very much appreciated and my stop me from going back to
> >classic asp.
> >
> >
> >Daniel
> >
>
>
>
> ---
> Beginning ASP.NET Databases using VB.NET
> http://www.wrox.com/ACON11.asp?ISBN=1861006195
>
> Beginning ASP.NET Databases using C#
> http://www.wrox.com/ACON11.asp?ISBN=1861007418
>
> These books look at how we can create data-centric ASP.NET
> applications. Requiring some basic knowledge of ASP.NET,
> Access and SQL the authors guide you through the process
> of connecting and consuming information in a variety of
> ways. They are packed full of excellent illustrative code
> examples, demonstrating important fundamental principles.
>
|
|
 |