Home All Groups Group Topic Archive Search About

TableAdapter.Fill() Return Value Meaning

Author
31 Jul 2006 4:43 PM
Scott
All,

I am using a TableAdapter Fill method to return a row(s0 into a data table:

int return = daMyDataAdapter(myTable, 3);
Where above will fill myTable when it's index = 3;

However I cannot find any documentation on what the return value is for this
method.
I notice when index is not found return = 0 and if it is found return = 1
(one row found.

Does anyone no the meaning of these return values?

Thanks in advance.

Author
31 Jul 2006 7:14 PM
Earl
In this case, you have declared return as an integer, and it is showing just
what it means ... it returned zero records or it found one record.


Show quote
"Scott" <Sc***@discussions.microsoft.com> wrote in message
news:39614948-5960-4498-84A0-112AA2019A5B@microsoft.com...
> All,
>
> I am using a TableAdapter Fill method to return a row(s0 into a data
> table:
>
> int return = daMyDataAdapter(myTable, 3);
> Where above will fill myTable when it's index = 3;
>
> However I cannot find any documentation on what the return value is for
> this
> method.
> I notice when index is not found return = 0 and if it is found return = 1
> (one row found.
>
> Does anyone no the meaning of these return values?
>
> Thanks in advance.
Author
31 Jul 2006 8:47 PM
Scott
Earl,

Thanks for the response. That is just the behavior I was hoping for.

Strange that I could not find what the return value meant for
TableAdapter.Fill()  on MSDN.

Show quote
"Earl" wrote:

> In this case, you have declared return as an integer, and it is showing just
> what it means ... it returned zero records or it found one record.
>
>
> "Scott" <Sc***@discussions.microsoft.com> wrote in message
> news:39614948-5960-4498-84A0-112AA2019A5B@microsoft.com...
> > All,
> >
> > I am using a TableAdapter Fill method to return a row(s0 into a data
> > table:
> >
> > int return = daMyDataAdapter(myTable, 3);
> > Where above will fill myTable when it's index = 3;
> >
> > However I cannot find any documentation on what the return value is for
> > this
> > method.
> > I notice when index is not found return = 0 and if it is found return = 1
> > (one row found.
> >
> > Does anyone no the meaning of these return values?
> >
> > Thanks in advance.
>
>
>
Author
31 Jul 2006 8:34 PM
zackary.evans
The DataAdapter.Fill method always returns the number of rows added to
the DataSet. MSDN is your friend.


Scott wrote:
Show quote
> All,
>
> I am using a TableAdapter Fill method to return a row(s0 into a data table:
>
> int return = daMyDataAdapter(myTable, 3);
> Where above will fill myTable when it's index = 3;
>
> However I cannot find any documentation on what the return value is for this
> method.
> I notice when index is not found return = 0 and if it is found return = 1
> (one row found.
>
> Does anyone no the meaning of these return values?
>
> Thanks in advance.

AddThis Social Bookmark Button