Search code examples
iphoneobjective-csqlitefmdb

How to take copy of FMResultset in FMDB Sqlite


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.....


Solution

  • 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.