Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7023301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:41:37+00:00 2026-05-27T23:41:37+00:00

Even though I rarely have problems with FMDatabase, I noticed some odd behavior today

  • 0

Even though I rarely have problems with FMDatabase, I noticed some odd behavior today and was wondering if this is a bug or due to a mistake of my own.

NSString *query = [NSString stringWithFormat:@"SELECT * FROM TABLE_A WHERE modelId = %lu", modelId];
FMResultSet *resultSet = [db executeQuery:query];

while ([resultSetIPTCProperties next]) {
    NSLog(@"MODEL ID: %lu", [resultSetIPTCProperties intForColumn:@"stringId"]);
}

The odd thing is that this all works fine, but I wanted to play safe and precede the while loop with an if statement using [db hasAnotherRow], but this returns NO even when the result set does contain results.

When I log the resulting dictionary (using FMResultSet’s resultDict method) to the console, I get a warning from FMResultSet saying “Warning: There seem to be no columns in this set.” even though I can use them in my while loop.

Am I missing something here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:41:37+00:00Added an answer on May 27, 2026 at 11:41 pm

    You have to call [resultSet next] before you can call [resultSet resultDict] otherwise the pointer in the result is before the first row. This is also why your loop works, but your check for hasAnotherRow does not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Even though I have a robust and fast computer (Pentium Dual Core 2.0 with
Even though I've been a developer for awhile I've been lucky enough to have
I saw that __VIEWSTATE field gets rendered even though I have set the EnableViewState=false
I was wondering if somebody has some insight on this issue. A little background
Even though we have languages like C++ , Java , Python , etc., why
Even though I know that, at least to my knowledge, this is not the
Even though I have read a lot about it I can't get my head
even though php page's header set to UTF-8 i get this error here is
Even though I'm pretty sure I know why this error gets raised, I don't
Even though I have done bit of coding in java, I'm still finding it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.