|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
TableAdapter.Fill() Return Value MeaningAll,
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. 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. 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. > > > 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.
Other interesting topics
SqlClient Connections created don't get reused in the pool and cause error in ASP.NET Page
DataSet.WriteXML Vs. SQL Server 2000 XML performance issue??? Creating a table with AllowZeroLength=True using adox in Net 2.0 How to get xml based dataset to update an SQL server database? can not find installable isam |
|||||||||||||||||||||||