Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 How I will come to know the no. of rows returned?

Author  Topic 

ketu0001
Starting Member

11 Posts

Posted - 2007-06-12 : 10:21:05
I am using SQLExecute() in C++ code.
My query is "select * from Revoked_users"?
How I will come to know the no. of rows returned by SQLExecute() ?

nr
SQLTeam MVY

12543 Posts

Posted - 2007-06-12 : 10:45:29
Have a look at the record count on the resultset

Or you could return the number of rows in the table with each row returned (bit of a waste though).

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

ketu0001
Starting Member

11 Posts

Posted - 2007-06-13 : 00:31:36
Can you give me a sample code?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-06-13 : 09:20:37
Immediately after the select statement run

Select @@rowcount

I dont know C++

If VB6, if you use Recodset object, you can make use of its method
Rs.Recordcount

See if you find such similar method in C++


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-13 : 09:34:07
See if SQLRowCount() helps to get record count.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -