473,405 Members | 2,404 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,405 software developers and data experts.

checking for 0 records in a table

How can I check for the number of records in a table?

If MyDataSet1.Table1.recordcount = 0
'my code'
End If

--
_____
DC G
Nov 21 '05 #1
8 1096
MyDataSet1.Tables[0].Rows.Count

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:ez**************@TK2MSFTNGP09.phx.gbl...
How can I check for the number of records in a table?

If MyDataSet1.Table1.recordcount = 0
'my code'
End If

--
_____
DC G

Nov 21 '05 #2
MyDataSet1.Tables[0].Rows.Count

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:ez**************@TK2MSFTNGP09.phx.gbl...
How can I check for the number of records in a table?

If MyDataSet1.Table1.recordcount = 0
'my code'
End If

--
_____
DC G

Nov 21 '05 #3
MyDataSet1.Table1.Rows.Count

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:ez**************@TK2MSFTNGP09.phx.gbl...
How can I check for the number of records in a table?

If MyDataSet1.Table1.recordcount = 0
'my code'
End If

--
_____
DC G

Nov 21 '05 #4
MyDataSet1.Table1.Rows.Count

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:ez**************@TK2MSFTNGP09.phx.gbl...
How can I check for the number of records in a table?

If MyDataSet1.Table1.recordcount = 0
'my code'
End If

--
_____
DC G

Nov 21 '05 #5
DC Gringo <dc******@visiontechnology.net> typed:
How can I check for the number of records in a table?

If MyDataSet1.Table1.recordcount = 0
'my code'
End If


Try this:

If MyDataSet1.Tables("Table1").Rows.Count = 0 Then
'your code here
End If

--
Davide Vernole
MVP ASP/ASP.NET
Microsoft Certified Solution Developer
Nov 21 '05 #6
DC Gringo <dc******@visiontechnology.net> typed:
How can I check for the number of records in a table?

If MyDataSet1.Table1.recordcount = 0
'my code'
End If


Try this:

If MyDataSet1.Tables("Table1").Rows.Count = 0 Then
'your code here
End If

--
Davide Vernole
MVP ASP/ASP.NET
Microsoft Certified Solution Developer
Nov 21 '05 #7
Use DataTable.Rows.Count property.

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:ez**************@TK2MSFTNGP09.phx.gbl...
How can I check for the number of records in a table?

If MyDataSet1.Table1.recordcount = 0
'my code'
End If

--
_____
DC G

Nov 21 '05 #8
Use DataTable.Rows.Count property.

"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:ez**************@TK2MSFTNGP09.phx.gbl...
How can I check for the number of records in a table?

If MyDataSet1.Table1.recordcount = 0
'my code'
End If

--
_____
DC G

Nov 21 '05 #9

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

Similar topics

8
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. ...
1
by: JS | last post by:
I have set up db2audit for checking on win2k v8 db, but when I extract the records from the log and load them into the checking table, I don't get the object name in objname colum. My understanding...
5
by: Jermin | last post by:
Hi, I have a database composed of a single table composed of 2 columns, an auto-numbered ID column and a column which contains 30 million random numbers. All I want to Access to do is check the...
1
by: Maxi | last post by:
I have two tables "Data" and "Check" Here is the content of the tables: "Data" "Check" Field1 Field1 Field2 Jack Jill Yes Jill Maxi Yes Dino John ...
8
by: J-P-W | last post by:
Hi, anyone got any thoughts on this problem? I have sales reps. that remotely send their data to an ftp server. The office downloads all files, the code creates an empty file, then downloads the...
10
by: mcbobin | last post by:
Hi, Here's hoping someone can help... I'm using a stored procedure to return a single row of data ie a DataRow e.g. public static DataRow GetManualDailySplits(string prmLocationID, string
0
by: rdemyan | last post by:
Is there a way to check the validity of front-end table links on a backend file where all permissions to data have been revoked. To get at the data, the front end uses RWOP queries. What I'm...
46
by: John | last post by:
Hi How can I check for existence of a certain table by name in and access database and if the table exists find the number of records in it? I guess I can access this information by setting up...
2
by: hakkatil | last post by:
Hi to all, I have a page that inserts excel sheet to access database. I am using asp. What I want to do is to check the inserting record if it is in the database. Basicly checking the dublicate...
2
by: padmaneha | last post by:
There are two tables in our database Businessmaster and locationmaster Businessmaster has the following fields like contentid, businessname, businesstype, location, city, state, country, zipcode,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.