Ask a Question

How to check if a recordset is null

SOLVED
Adagio
Frequent Contributor

How to check if a recordset is null

Hello,

 

After establishing a connection between TestComplete and Db2, I ran a query which didn't return any results.

How can I verify if the recordset is null (i.e. not records have been returned in the result set.)? 

 

Please refer to the snapshot.

 

DBerror.PNG

 

Any help would be appreciated! 

 

Thank you

Abhi

1 ACCEPTED SOLUTION

Accepted Solutions
tristaanogre
Community Hero

Re: How to check if a recordset is null

I would check EOF before you do the move first...  if EOF is true, then there are no records


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

2 REPLIES 2
tristaanogre
Community Hero

Re: How to check if a recordset is null

I would check EOF before you do the move first...  if EOF is true, then there are no records


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

Adagio
Frequent Contributor

Re: How to check if a recordset is null

Thank you, Robert! I tried something similar and it worked.

cancel
Showing results for 
Search instead for 
Did you mean: