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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:14:49+00:00 2026-06-17T09:14:49+00:00

I can receive the data from .sql file(sqlite) in iOS5 , But in ios6.

  • 0

I can receive the data from .sql file(sqlite) in iOS5 , But in ios6. The app is getting hang..

If the query is select * from Table then works perfectly

If query is select *from Table order by ID DESC then the app is getting hang

some times the app hang in (sqlite3_open([dbPath UTF8String],&db) == SQLITE_OK)

some times hangs in

while(sqlite3_step(compiledStatement) == SQLITE_ROW)
{
}
  • 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-17T09:14:50+00:00Added an answer on June 17, 2026 at 9:14 am

    Finalize the statements and Close the connection properly each you perform an operation, then you should be fine with the sqlite. If the statements are not finalized then you get to states like SQLITE_BUSY,SQLITE_LOCKED which you need to handle. If the app is hanging that means your main thread is blocked. Following is a sample sqlite operation.

    -(int)keyIdForImgId:(int)ImgId
    {
    
        @synchronized(self)
        {
            int keyId=0;
    
            sqlite3 *database=nil;
            if (sqlite3_open([[self getDBPath] UTF8String], &database) == SQLITE_OK) {
    
                const char *sql = "SELECT keyId From SomeTableName WHERE imageId=?";
                sqlite3_stmt *selectstmt=nil;
                if(sqlite3_prepare_v2(database, sql, -1, &selectstmt, NULL) == SQLITE_OK) {
    
                    sqlite3_bind_int(selectstmt, 1, ImgId);
    
                    while(sqlite3_step(selectstmt) == SQLITE_ROW) 
                    {
    
                        keyId = sqlite3_column_int(selectstmt, 0);
    
    
                    }
    
                }
                sqlite3_finalize(selectstmt);
                sqlite3_close(database);
            }
            return keyId;
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can successfully receive email from SendGrid and process its data. My problem is
This seems simple but I can't figure it out. I receive post data in
How can i export my data from SQL server 2008 into Excel 2010 or
How can i send and receive data though parallel port using C# .net? Also
How can I receive multipart POST data requests in ASP.NET C#?
I want to make an app that can receive broadcast when other apps on
Im about to develop notifications for my app. In whatsapp you can receive group
im trying to retrieve data from my table only for some reason I receive
In my iphon app , I'm reading from sqlite db into NSMutableArray *sales and
As far as I know, Biztalk can receive EDI from trading partner, look up

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.