Jump to content
  • Advertisement
Sign in to follow this  
Structural

VB6 - checking if a variable is set

This topic is 4997 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm cleaning up some old Visual Basic 6 code at work and I've run into a problem of someone not checking if an ADO recordset is set (with new, or set) or not. Being used to C++ I tried isNull, but that doesn't seem to work here in VB. Neither does isSet. I tried IsEmpty, var = Nothing, IsObject, but none tell me if the variable is set or not. So, what function would I need to see if the object is set or not?

Share this post


Link to post
Share on other sites
Advertisement
depending on what your recordset is called do this.

for example it will be rst.


if rst.EOF = true then
'no useable records
else
'some records here
end if

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!