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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:09:33+00:00 2026-05-27T22:09:33+00:00

I have an app,where I need to save a reminder in one page and

  • 0

I have an app,where I need to save a reminder in one page and in other display the saved reminder.I have done it successfully using sqlite3!

In the view reminder page,the user would have 3 options to view,view all which I have already implemented,view group that contains reminders of 4 groups.Because they are just 4 groups,I have created 4 view controllers for 4 unique groups.Just simply using the following query which worked perfect:

 NSString *sqlQuery = [NSString stringWithFormat:@"select * from reminders WHERE grp = 'Friends'"];

But I have a problem with view monthly page which contains 12 row components in picker view for the user to select,i.e all the 12 months of the year:

I have found out the query for retrieving all the reminders in a particular month,say for month december,I have retrieved using the following query:

NSString *sqlQuery = [NSString stringWithFormat:@"select * from reminders WHERE Date BETWEEN '2012-12-01' AND '2012-12-31'"];

Before entering in to view monthly page(controller),there is a month picker view as I have mentioned earlier,I know that we can have separate view controller pages for displaying the data of 12 months as I did in the case of view group reminders,but the code becomes hectic.Hence I want the table view to get updated automatically based on month selected in picker view(row component).

I found out a similar question,but the question was unanswered!

Update table view data based on row component selected in picker view

I tried to create an instance of the class controller where picker view is present for the view controller where data is getting displayed:

ERViewEditController *viewEditController;

and while retrieving I used the following code:

if(viewEditController.monthPicker selectedRowInComponent:0)
{
sqlQuery = [NSString stringWithFormat:@"select * from reminders WHERE Date BETWEEN '2012-01-01' AND '2012-01-31'"];
sql_stmt = [sqlQuery UTF8String];
}

else if(viewEditController.monthPicker selectedRowInComponent:1)
{
sqlQuery = [NSString stringWithFormat:@"select * from reminders WHERE Date BETWEEN '2012-02-01' AND '2012-02-31'"];
sql_stmt = [sqlQuery UTF8String];
}

etc… and so on for all months then used the following code for display:

if (sqlite3_prepare_v2(self.remindersDB, sql_stmt, -1, &statament, NULL) == SQLITE_OK) 
        {
            while (sqlite3_step(statament) == SQLITE_ROW) 
            {             
                ReminderClass *remin = [[ReminderClass alloc]init];

                remin.Name = [[[NSString alloc]initWithUTF8String:(const char *)sqlite3_column_text(statament, 1)]autorelease];
                remin.Event = [[[NSString alloc]initWithUTF8String:(const char *)sqlite3_column_text(statament, 2)]autorelease];
                remin.Date = [[[NSString alloc]initWithUTF8String:(const char *)sqlite3_column_text(statament, 3)]autorelease];

                NSDateFormatter *dateFormat = [[NSDateFormatter alloc]init];
                [dateFormat setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
                NSDate *date = [dateFormat dateFromString:remin.Date];
                [dateFormat setDateFormat:@"MMMM dd"];
                NSString *dateVal = [dateFormat stringFromDate:date];
                remin.Date = dateVal;

                [self.monthArray addObject:remin];
                [remin release];
            }

            sqlite3_finalize(statament);
        }

Nothing is getting displayed now 🙁

How can I achieve the requirement,can any one please help me out with your valuable suggestions!

Thanks all in 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-05-27T22:09:34+00:00Added an answer on May 27, 2026 at 10:09 pm

    I found out the answer in this link:

    Get selected value of a picker view that is present in different view and use the string in some other view

    Thank you all 🙂

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

Sidebar

Related Questions

I have an app,where I need to save a reminder in one page and
I have an app, and now, I need to save user's preferences. I've done
In my app I have need to trigger show some custom view when status
have an app that finds your GPS location successfully, but I need to be
I have a simple questionnaire app where I need to save the history of
I have a problem for this APP. I need to save a Datapicker selection.
I have an Android app where I need to save a file. I create
I have an application for Android built using Flex. I need to save some
I have an app in which I need to save my images into sdcard
I have an app where I need to get the list of countries,languages etc

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.