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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:59:26+00:00 2026-05-29T09:59:26+00:00

I am extremely new for iPhone and SQLite. I have 1 button and three

  • 0

I am extremely new for iPhone and SQLite.
I have 1 button and three textfieldsfor ID,Name and author…When I Enter ID in ID textfield and press buttton , relative name and author should be displayed in other two textboxes..I have tried to show only name field and get success but for displaying two fields it is not working..my code is:

-(IBAction)getdata:(id)sender
{
    NSString *str = bid.text;
    int test = [str intValue];   
    NSLog(@"get clicked");
    [self databaseOpen];
    NSString *getData = [NSString stringWithFormat:@"SELECT Name,Author FROM 
                  stud WHERE ID =   %d",test];
    NSLog(@"getdata %@",getData);
    NSArray *array = [adddatabase executeQuery:getData];
    [adddatabase executeQuery:getData];
    getData = [[array objectAtIndex:0]valueForKey:@"Name"];
    NSLog(@"update query:%@",getData);
    get.text = [NSString stringWithFormat:@"%@",getData];
    NSString *authordata = [[NSString alloc]init];
    authordata = [[array objectAtIndex:1]valueForKey:@"Author"];
    NSLog(@"author: %@",authordata); 
    author.text=[NSString stringWithFormat:@"%@",authordata];     
 }

help me…my program is getting stopped after NSLOG(@”update query : %@”,getData); and Signal abort is shown.

  • 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-29T09:59:27+00:00Added an answer on May 29, 2026 at 9:59 am

    why you allocating NSString instead of that directly use this and there is one more error you are getting only record from the database where you are writing [array objectAtIndex:1] this gives you error

    Try this

    NSString *authordata = [[array objectAtIndex:0] valueForKey:@"Author"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm extremely new to JS and have this code that I'm trying to tweak.
I'm extremely new to Java, and have mostly just been teaching myself as I
So I'm extremely new to Linq in .Net 3.5 and have a question. I
I'm extremely new to cocos2D development and I have hit a problem with my
As I'm extremely new to java, I seem to have trouble grasping some concepts.
I am extremely new to SVN. I have created my own repository which is
I'm extremely new to rational tools. I have a script recorded and its ready
I am extremely new to javascript and I have worked on this for hours....
I am extremely new to Java (just started this weekend) and have a background
I'm extremly new to iphone and I have the following misunderstanding. All over internet

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.