I am having an OleDBDataAdapter and a dataset. I fill the dataset with
a row and execute

Adapter.update(dataset,"Table Name");
Adapter.fill(dataset,"Table Name");

For the database table, my primary key is an auto number.

Currently, I am fetching the key using:

dataset.Tables["Table Name"].Rows[0].ItemArray[0]

It is working because this is the only row added into my table.
But I am certain that there should be a better alternative to this.
Waiting for response.

Jag

Re: What is the Best way to fetch the most recent updated row in a database by Miha

Miha
Fri Jan 28 11:17:12 CST 2005

Are you using Access database?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com

<jagrat@gmail.com> wrote in message
news:1106931590.480728.88580@c13g2000cwb.googlegroups.com...
>I am having an OleDBDataAdapter and a dataset. I fill the dataset with
> a row and execute
>
> Adapter.update(dataset,"Table Name");
> Adapter.fill(dataset,"Table Name");
>
> For the database table, my primary key is an auto number.
>
> Currently, I am fetching the key using:
>
> dataset.Tables["Table Name"].Rows[0].ItemArray[0]
>
> It is working because this is the only row added into my table.
> But I am certain that there should be a better alternative to this.
> Waiting for response.
>
> Jag
>



Re: What is the Best way to fetch the most recent updated row in a database by W

W
Fri Jan 28 11:16:25 CST 2005

check out www.betav.com - Articles, MSDN - Retrieving the Gozoutas

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
<jagrat@gmail.com> wrote in message
news:1106931590.480728.88580@c13g2000cwb.googlegroups.com...
> I am having an OleDBDataAdapter and a dataset. I fill the dataset with
> a row and execute
>
> Adapter.update(dataset,"Table Name");
> Adapter.fill(dataset,"Table Name");
>
> For the database table, my primary key is an auto number.
>
> Currently, I am fetching the key using:
>
> dataset.Tables["Table Name"].Rows[0].ItemArray[0]
>
> It is working because this is the only row added into my table.
> But I am certain that there should be a better alternative to this.
> Waiting for response.
>
> Jag
>



Re: What is the Best way to fetch the most recent updated row in a database by jagrat

jagrat
Fri Jan 28 11:25:43 CST 2005

Hi Miha,

I am using Access database.


Re: What is the Best way to fetch the most recent updated row in a database by Miha

Miha
Fri Jan 28 15:36:44 CST 2005

Hi,

Check out
Retrieving Identity or Autonumber Values
.net help topic.
MSDN Oct link
(ms-help://MS.VSCC.2003/MS.MSDNQTR.2004OCT.1033/cpguide/html/cpconretrievingidentityorautonumbervalues.htm)

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com

<jagrat@gmail.com> wrote in message
news:1106933143.116234.202490@c13g2000cwb.googlegroups.com...
> Hi Miha,
>
> I am using Access database.
>