Reputation: 527
I tried to return the reference of FMResult object from a method and trying to access values from the returned object and couldn't able to access.
So can anyone suggest how to return the FMResult object from method and access it from outside.
Thanks in advance.....
Upvotes: 0
Views: 828
Reputation: 243146
FMResultSet
objects are pretty transient. The come and go very quickly. If you need to preserve information from a result set for any sort of extended period of time (like, longer than your current method), then you should extract the values you care about and save them yourself.
Upvotes: 2
Reputation: 841
You can use a reference to a FMResultSet elsewhere, however it must be used on the same thread where the original query was ran.
Also, you can only iterate over the result set once. After you iterate, it will automatically close the sqlite statement and you will no longer be able to access the results.
If that doesn't give you any clues, post all the relevant code.
Upvotes: 1