473,545 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tableadapter record count

Hi

I am using the below statement;

Me.MyTableAdapt er.Fill(Me.MyDa taSet.tblMyTabl e)

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 9049
MyDataSet.tblMy Table.Count
"John" <in**@nospam.in fovis.co.ukschr eef in bericht
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
Hi

I am using the below statement;

Me.MyTableAdapt er.Fill(Me.MyDa taSet.tblMyTabl e)

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.SQL CLient.SQLDataA dapter
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.MyTableAdapt er.Fill has several signatures, and that
it returns an integer. I wonder what that integer is for?

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

dim iRowCount as integer = Me.MyDataSet.tb lMyTable.Rows.C ount
dim iSomeInteger as integer =
Me.MyTableAdapt er.Fill(Me.MyDa taSet.tblMyTabl e)
dim iNewRowCount as integer = Me.MyDataSet.tb lMyTable.Rows.C ount

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.in fovis.co.ukwrot e in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
Hi

I am using the below statement;

Me.MyTableAdapt er.Fill(Me.MyDa taSet.tblMyTabl e)

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
44089
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 scott/tiger@common control=/full_path/test.ctl log=/full_path/adhoc/test.log SQL*Loader: Release 9.2.0.1.0 - Production on Tue Sep 2 10:49:27 2003 ...
3
9278
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 correct recount if the count is greater than 0. It the count is 0 it returns the value of the $transid variable in the code. Can someone tell me what...
1
10573
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 = true despite the fact that there is has an actual record (record count = 1). The count is correct, there should be one record (it shows on the...
1
3184
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 TR tag td <record> /td if record count = even then wrote out the /TR tag if record count = odd AND it's the last record, write out an empty TD and
7
26814
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 records. How can I show this? I have a text box that shows the current record using: Text1 = Me.Current I want to show the total number of records....
4
3079
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 Odbc.OdbcConnection("DSN=database")
2
2164
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 C D E F
7
8690
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 importing a .txt file into access using a specification file. The table is created at this time. When these steps are performed by hand access prompts you...
7
4640
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 different reports. I now have the task of a Daily report which I have been able to get to the point where it does 90% of what I need. I have been searching...
0
7391
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7802
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7410
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7746
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4941
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3443
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3438
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1869
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.