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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:34:54+00:00 2026-06-18T18:34:54+00:00

I gave same name for table and database .But i am getting no such

  • 0

I gave same name for table and database .But i am getting no such table found error.

sqlite3 *dbConnection = nil;
NSArray *documentDirectory = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *path = [documentDirectory objectAtIndex:0];
NSString *documentPath = [path stringByAppendingPathComponent:@"locations.sqlite"];
sqlite3_open([documentPath UTF8String], &dbConnection);

sqlite3_stmt *statement = nil;

@try {
    if(sqlite3_open([documentPath UTF8String], &dbConnection)!=SQLITE_OK)
    {
        sqlite3_close(dbConnection);
    }
    else
    {

        //create editable database copy

    }
    NSString *selectQuery=[[NSString alloc] initWithFormat:@"select * from address_locations"];
    const char * retrieveQuery = [selectQuery UTF8String];

    if(sqlite3_prepare_v2(dbConnection,retrieveQuery, -1, &statement, nil)==SQLITE_OK)
    {
        while (sqlite3_step(statement)==SQLITE_ROW)
        {
            NSMutableDictionary * dictionaryAboutInfo = [[NSMutableDictionary alloc]init];
            [dictionaryAboutInfo setValue:[NSString stringWithFormat:@"%s",sqlite3_column_text(statement, 0)] forKey:@"ZIP"];
            [dictionaryAboutInfo setValue:[NSString stringWithFormat:@"%s",sqlite3_column_text(statement, 1)] forKey:@"LATITUDE"];
            [dictionaryAboutInfo setValue:[NSString stringWithFormat:@"%s",sqlite3_column_text(statement, 2)] forKey:@"LONGITUDE"];
            ////NSLog(@"Retrived Dict values %@",dictionaryAboutInfo);
            [dealersInfoArray addObject:dictionaryAboutInfo];
            [dictionaryAboutInfo release];
        }
    }
    [selectQuery release];
}
@catch (NSException *exception) {

}
@finally {
    sqlite3_finalize(statement);
    sqlite3_close(dbConnection);
}

Thanks for advance

  • 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-18T18:34:55+00:00Added an answer on June 18, 2026 at 6:34 pm
     BOOL  success;
    NSFileManager *fileManager=[NSFileManager defaultManager];
    success = [fileManager fileExistsAtPath:documentPath];
    if (success) 
    {
        NSLog(@"file found at the document path"); 
    }
    //bundle path
    NSString *databasePathFromApp = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"address_locations.sqlite"];
    [fileManager copyItemAtPath:databasePathFromApp toPath:documentPath error:nil];
    

    sqlite3_open([documentPath UTF8String], &dbConnection);

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

Sidebar

Related Questions

The Error ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no
My query show two person with name Anna, Szymkowiak and this same id but
I gave a site full trust however I am still getting some security exceptions.
I gave to Google Guice the responsibility of wiring my objects. But, how can
While trying to write this code, I get an error cin doesnt name a
I'm in training period and my trainer gave me some database exercises. I have
Suppose I have a table : Table A: Id Name Movie Comment 1 Foo
Is it possible to get multiple inputs of the same name to post and
I have a table with four columns: Account#, Card#, CardNameType and Cardholder's Name. The
@swatkins gave a fantastic answer to his own question about using jQuery templates with

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.