advansis Active Member Licensed User Longtime User Jan 17, 2020 #1 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 ?
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 Jan 19, 2020 #2 advansis said: Any way to rewind the cursor ? Click to expand... 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. advansis said: Some times I forgot to close a Resultset after reaching the end. Click to expand... SQLite ResultSets and Cursors will be closed automatically when the object is released by the garbage collector.
advansis said: Any way to rewind the cursor ? Click to expand... 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. advansis said: Some times I forgot to close a Resultset after reaching the end. Click to expand... SQLite ResultSets and Cursors will be closed automatically when the object is released by the garbage collector.