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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Determine If A Table/Cursor Is Empty? 5

Status
Not open for further replies.

Rock4J

Programmer
Jan 14, 2013
94
MY
As per thread184-785663

I'm looking for a code that can Determine if a table is empty.

Using ADO-Recordset in VB I usually use ".Recordcount", as simple as that.

I believe there is a right way to do it in Foxpro. and hopefully it support "VPF6".

Please help.

Thanks. :)

Regards,
Rocky
 
Try it on an empty table the USE leaves you with BOF()=.f. EOF()=.t. honest!

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
I tried, I zapped a table, closed and reopened it, and both BOF() and EOF() are .T.

Bye, Olaf.
 
How strange, I get BOF() as .f. until I issue a GO TOP...

Perhaps it's a SP thing... still it does the same thing in VFP6 and VFP9, so I doubt it.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Maybe it depends on version, SP or any setting.
Let's end it this way: it doesn't matter, because all you need to check is EOF() anyway.

Bye, Olaf.
 
Cool

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top