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

  • SEARCH
  • Home
  • 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 7929437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:04:37+00:00 2026-06-03T20:04:37+00:00

some friends and me are developing a game in cocos2d :), and im using

  • 0

some friends and me are developing a game in cocos2d :), and im using fmdb for some settings in it. Actually i have this code :


NSString *path = [[NSBundle mainBundle] pathForResource:@”myDB” ofType:@”sqlite”];

mainDB = [FMDatabase databaseWithPath:path];

if ([mainDB open])
    NSLog(@"did open db");
else 
    NSLog(@"did not open db");

_stages = [[NSMutableArray alloc] init];

[mainDB open];

FMResultSet *FResult = [mainDB executeQuery:@"select * from stagesTable"];

NSLog(@"columns : %d",[FResult columnCount]);

if ([FResult next])
NSLog(@”have objects”);
else
NSLog(@”dont have objects”);

NSLog(@"with %d objects",[_stages count]);

[mainDB close];

But FResult is not storing anything, mainDB does open, but columns are 0 objects are 0 and it always says that it doesnt have any objects. What could be wrong? Thanks 😀 !

  • 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-06-03T20:04:40+00:00Added an answer on June 3, 2026 at 8:04 pm

    Try setting logsErrors=YES; on your mainDBand watch the output on the console.

    You never populate _stages so that will always have zero objects in it..

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

Sidebar

Related Questions

I am developing a website using CodeIgniter and PHP. Some of my friends suggest
I am developing a simple library in C, for my own + some friends
Some friends and I wanted to develop a game. Any language will do. I've
I'm actually creating websites for fun and some of my friends told me that
My Friends, I spent quite some time on this one... but cannot yet figure
Friends, i have some vast amount of data to be printed on a graph
The title explains all... I have this snippet of code in my application: String
I'm developing a web app. I'd like to be able to let some friends
Beyond work, some friends and I are trying to build a game of sorts;
I am currently developing a blog for myself and my friends, (with some special

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.