Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking Record Set (VS)

Status
Not open for further replies.

TheConeHead

Programmer
Joined
Aug 14, 2002
Messages
2,106
Location
US
I am tranisitioning from asp to asp.net and have some basic questions... I am dev. from visual studio. My first question is:

In asp I would create a record set and see if it is empty via:

if (!rs.eof && !rs.bof) {

How do I do this in .net - do I create a data reader?? I have the SQL connection and command in my code behind page but I can not figure out how to create a record set and simply check it....

[conehead]
 
You can create a dataset or datatable and check the rowcount, EX:
Code:
dim i as integer
i = ds1.Tables(0).Rows.Count
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top