473,410 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

Tableadapter record count

Hi

I am using the below statement;

Me.MyTableAdapter.Fill(Me.MyDataSet.tblMyTable)

How can I now check the record count of the data table and specifically if
the record count returned by fill is not 0?

Thanks

Regards
Jun 27 '08 #1
2 9035
MyDataSet.tblMyTable.Count
"John" <in**@nospam.infovis.co.ukschreef in bericht
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hi

I am using the below statement;

Me.MyTableAdapter.Fill(Me.MyDataSet.tblMyTable)

How can I now check the record count of the data table and specifically if
the record count returned by fill is not 0?

Thanks

Regards
Jun 27 '08 #2
Really, is that your question?

With MSDN installed
1. Dim x as System.Data.SQLCLient.SQLDataAdapter
2. Highlight SQLDataAdapter
3. Press F1

Without MSDN installed
1. Open your favorite browser
2. Navigate to msdn.microsoft.com
3. Search on SQLDataAdapter Class
Some more help.

Intellisense shows Me.MyTableAdapter.Fill has several signatures, and that
it returns an integer. I wonder what that integer is for?

After filling Me.MyDataSet.tblMyTable, there should be a collection of rows
(0-N). Me.MyDataSet.tblMyTable.Rows.Count will either equal 0 or N. If the
table already had rows then:

dim iRowCount as integer = Me.MyDataSet.tblMyTable.Rows.Count
dim iSomeInteger as integer =
Me.MyTableAdapter.Fill(Me.MyDataSet.tblMyTable)
dim iNewRowCount as integer = Me.MyDataSet.tblMyTable.Rows.Count

msgbox iNewRowCount - iRowCount & " rows have changed" & vbcrlf & "With a
return value of " & iSomeInteger & vbcrlf & "Which means " & iSomeInteger -
(iNewRowCount - iRowCount) & " rows were simply refreshed."
http://msdn2.microsoft.com/en-us/lib...xk(VS.80).aspx

Snip ...
Return Value
The number of rows successfully added to or refreshed in the DataSet. This
does not include rows affected by statements that do not return rows.
.... Snip
"John" <in**@nospam.infovis.co.ukwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hi

I am using the below statement;

Me.MyTableAdapter.Fill(Me.MyDataSet.tblMyTable)

How can I now check the record count of the data table and specifically if
the record count returned by fill is not 0?

Thanks

Regards

Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Hari Om | last post by:
Here are the details of my error log files: I execute the command and get following message at console: ---------------------------------------------------------------------- ../sqlldr...
3
by: thomasp | last post by:
I am trying to get a record count of a PHP query on a MS Acess database using ODBC with a DSN for MS ACCESS connection. I got this code from the PHP manual user notes. It seems to return the...
1
by: Ryan | last post by:
I've got a problem I have't run up against before. I generally test for an empty recordset using BOF and EOF. Today, for the first time I ran into a problem where my recordset shows BOF and EOF =...
1
by: darrel | last post by:
I'm trying to whip up a fancy repeater control that will put records into a two-column table for me. This is how I envision it working: itemtemplate if record count = odd then write out the...
7
by: Mike | last post by:
I have a form where I have turned off the default navigation buttons. I then created my own. This works fine. The only questions that I have is on the default navigation buttons it shows total...
4
by: Peter W Johnson | last post by:
Hi guys, I have a problem with a datagrid record count. Here is the code:- <snip> Public Class frmMerchantDeposit Inherits System.Windows.Forms.Form Dim myconnection As New...
2
by: Pramod Kadur | last post by:
Using borland c++, how can we fetch the record count in the following case: Suppose in XY table, First column A B ...
7
by: hjohnson | last post by:
Within the access environment, I have a table that I'd like to -add a column -place the record number of each record into that column The autonumber is not working for me because I am...
7
by: CampbellJD1 | last post by:
I am using Access 2003 Professional. I have been working with Access for some time and I have created an MDB with a Linked Table and the Data there is temporarily transferred to other Table for...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.