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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:02:29+00:00 2026-05-23T07:02:29+00:00

i have two database one database in webserver and other database in local here

  • 0

i have two database one database in webserver and other database in local
here i have to cheek in device if online connection is on then data should come from webserver database if online is off then data is come from sqlite local database and diplay data on iphone please help me in this problem

  • 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-23T07:02:29+00:00Added an answer on May 23, 2026 at 7:02 am

    Add reachabilty.m and reachabilty.h to your project. In your controller which is active throughout the life of the program add the following lines and use the below callback.

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(checkNetworkStatus:) name:kReachabilityChangedNotification object:nil];
    
        internetReachable = [[Reachability reachabilityForInternetConnection] retain];
        [internetReachable startNotifier];
    
        // check if a pathway to a random host exists
        hostReachable = [[Reachability reachabilityWithHostName: @"www.apple.com"] retain];
        [hostReachable startNotifier];
    

    The callback is as follows:

    - (void) checkNetworkStatus:(NSNotification *)notice
    {
        // called after network status changes
    
        NetworkStatus internetStatus = [internetReachable currentReachabilityStatus];
        switch (internetStatus)
    
        {
            case NotReachable:
            {
                break;
    
            }
            case ReachableViaWiFi:
            {
                break;
    
            }
            case ReachableViaWWAN:
            {
                break;
    
            }
        }
    
        NetworkStatus hostStatus = [hostReachable currentReachabilityStatus];
        switch (hostStatus)
    
        {
            case NotReachable:
            {
                break;
    
            }
            case ReachableViaWiFi:
            {
                break;
    
            }
            case ReachableViaWWAN:
            {
                break;
    
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two database one with relationship(no data) and another with out Relationship (with
I have two data sources: a legacy one (web service) and a database one.
I have two database tables. One table stores data for a commitment that a
Suppose I have two database files a.sqlite and other one is b.sqlite. suppose table1
I have two related tables in my database: Page and Tag. One Page can
I have two databases, one is an MS Access file, the other is a
I have two SQL Server 2005 databases, one is for development and the other
I have two Database, DB1 and DB2. How can I transfer data of DB1
I have two database tables, one for Users of a web site, containing the
I have two different database. One of them, original database and another one is

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.