Testing for no returned rows in recordset from SQL 6.5 using VB 6.0 
Author Message
 Testing for no returned rows in recordset from SQL 6.5 using VB 6.0

Hi,

How can I check for recordset contents before I do a 'MyTable.MoveFirst'
for when recordset is empty?

Rich



Mon, 09 Sep 2002 03:00:00 GMT  
 Testing for no returned rows in recordset from SQL 6.5 using VB 6.0
Hi,

How can I check for recordset contents before I do a 'MyTable.MoveFirst'
for when recordset is empty?

Rich



Mon, 09 Sep 2002 03:00:00 GMT  
 Testing for no returned rows in recordset from SQL 6.5 using VB 6.0
I depends on the cursor you are using, but in general you can use the
RecordCount property and/or check for EOF 8using the EOF property).

--
Regards

Carsten Thomsen [MVP-VB]
MCSE/VB Programmer & Analyst

PLEASE post ALL replies to the newsgroup(s) so we can all benefit from the
discussion!



Quote:
> Hi,

> How can I check for recordset contents before I do a 'MyTable.MoveFirst'
> for when recordset is empty?

> Rich



Tue, 10 Sep 2002 03:00:00 GMT  
 Testing for no returned rows in recordset from SQL 6.5 using VB 6.0
Hi !
assuming rst is your recordset , run this code :
if rst.eof and rst.bof then     ' true if recordset is empty

good luck !



Quote:
> Hi,

> How can I check for recordset contents before I do a
'MyTable.MoveFirst'
> for when recordset is empty?

> Rich

Sent via Deja.com http://www.deja.com/
Before you buy.


Tue, 10 Sep 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VB 6.0 & SQl server 6.5

2. CR 6.0 - SQL 6.5 - DSN Changed - VB 5.0

3. VB 6.0 & SQL Server 6.5

4. VB 6.0 and SQL 6.5

5. Testing Return Status of SQL SP using VB

6. executing SQL Server 6.5 stored procedure using VB 5

7. Suggestions for a CASE Tool using VB 4/SQL Server 6.5

8. How to save an VB PaintBrush Picture in SQL 6.5 using ADO

9. How to connect to SQL Server 6.5 using VB 5.0

10. VB4 RDO Performance: SQL Server 6.0 vs 6.5

11. SQL Server 6.0 vs 6.5

12. DAO Update Deadlocks SQL Server 6.5, but not 6.0

 

 
Powered by phpBB® Forum Software