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 8847129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:08:08+00:00 2026-06-14T12:08:08+00:00

I am storing a collection of values in a table with several columns of

  • 0

I am storing a collection of values in a table with several columns of different types, and inserting and selecting works fine when I run the app on the iPhone simulator. However, when running on a real device and selecting the data, it looks like it fails to get some of the text columns of the table (rest of columns seem to be correctly retrieved). Where I should be shown a dialog with a string, I am not, I get an empty dialog, whereas the dialog with the string was properly displayed on the simulator.

This is the code snippet for the insertion:

if(sqlite3_prepare_v2(database, sqlStatement,
                          -1, &compiledStatement, NULL) == SQLITE_OK)
    {
        sqlite3_bind_int(compiledStatement, 1, userData.ID);
        sqlite3_bind_double(compiledStatement, 2, userData.Location.Lat);
        sqlite3_bind_double(compiledStatement, 3, userData.Location.Lon);
        sqlite3_bind_text(compiledStatement, 4, [userData.Name UTF8String], -1, SQLITE_TRANSIENT);
        sqlite3_bind_text(compiledStatement, 5, [userData.Surname UTF8String], -1, SQLITE_TRANSIENT);
    }

    if(sqlite3_step(compiledStatement) == SQLITE_DONE) {
        sqlite3_finalize(compiledStatement);
    }
    else {
        NSLog(@"%d",sqlite3_step(compiledStatement));
    }
}
sqlite3_close(database);

And this is the selection:

if (sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) {
        while(sqlite3_step(compiledStatement) == SQLITE_ROW) {
            UserData *userData = [[UserData alloc] init];

            userData.ID = sqlite3_column_int(compiledStatement, 0);

            char *name = sqlite3_column_text(compiledStatement, 1);
            if (name == nil)
                userData.Name = @"";
            else
                userData.Name = [NSString stringWithUTF8String: name];

            [list addObject:userData];
        }
    }
    sqlite3_finalize(compiledStatement);
}
sqlite3_close(database);

I have absolutely no idea why database data management is behaving well in simulator (I have SQLite Manager plugin and data is correctly stored and retrieved), but it is not in a real iPhone. How could I check what is happening there on the device? Has somebody experienced something similar to this?

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-14T12:08:09+00:00Added an answer on June 14, 2026 at 12:08 pm

    I finally got it working, following all your advices, and I think what solved the problem in the end was the case-sensitive thing. Thanks to u all

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

Sidebar

Related Questions

Spring has ability to initialisate values of core java collection types . I have
Possible Duplicate: Which collection for storing unique strings? I am currently using a Dictionary<string,
I'm looking at reducing the memory consumption of a table like collection object. Given
I am inserting rows into a table from a Powershell script. I loop through
I have a PL/SQL collection of following type type p_typ_str_tab is table of varchar2(4000)
So I'm currently working on a project that involves the collection and storing of
I get all rows in displaytag table same values i.e. It displays same values
My project generates few values(equal partitioning method) for each data types by getting the
I am working on an application that requires several types of Crystal Reports, standard
I've been storing collections of user settings in the Properties.Settings.Default object and using the

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.