Wish Resultset AutoClose Property

advansis

Active Member
Licensed User
Longtime User
Some times I forgot to close a Resultset after reaching the end. It would be very useful to have an AutoClose property, that closes the object when NextRow returns False.
Hope it will be useful to others. PS. Any way to rewind the cursor ?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Any way to rewind the cursor ?
B4X:
Dim jo As JavaObject = ResultSet1
jo.RunMethod("beforeFirst", Null)
If you are using it with JdbcSQL then the result type might be "forward only" which means that this call will fail.

Some times I forgot to close a Resultset after reaching the end.
SQLite ResultSets and Cursors will be closed automatically when the object is released by the garbage collector.
 
Top