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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:30:19+00:00 2026-06-03T06:30:19+00:00

i am trying to convert array object into string but still it is returning

  • 0

i am trying to convert array object into string but still it is returning address of object.
it is returning – 0x5e1e370
but should return some string value .

NSMutableArray *arrStudents = [pillboxDb getStudentRecords];
NSString *strHow = [arrStudents objectAtIndex:0];
NSLog(@"%@",strHow);

Here is the code for getStudentRecords

+(NSMutableArray*)getStudentRecords{

NSArray *arrDocPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *strDestPath = [NSString stringWithFormat:@"%@/samplepillbox1.sqlite",[arrDocPath objectAtIndex:0]];
NSMutableArray *arrStudents = [[NSMutableArray alloc]init];
sqlite3 *db;
if(sqlite3_open([strDestPath UTF8String], &db)==SQLITE_OK)
{

    NSString *query = @"select * from doctor_master";
    void* v;
    char* err_msg;
    sqlite3_stmt *studentStmt;

    if(sqlite3_prepare_v2(db, [query UTF8String], -1, &studentStmt, &err_msg)==SQLITE_OK)
    {
        while (sqlite3_step(studentStmt)==SQLITE_ROW) {

            int sno = sqlite3_column_int(studentStmt, 0);
            NSString *sname = [NSString stringWithUTF8String: sqlite3_column_text(studentStmt, 1)];
            //float marks = sqlite3_column_double(studentStmt, 2);

            pillbox *st = [[pillbox alloc]init];
            st.Din = sno;
            st.Name = sname;

            [arrStudents addObject:st];
        }

    }

}
return arrStudents;

}

  • 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-03T06:30:21+00:00Added an answer on June 3, 2026 at 6:30 am

    try this:

    NSMutableArray *arrStudents = [pillboxDb getStudentRecords];
    pillbox *st = [arrStudents objectAtIndex:0];
    NSLog(@"%@ , %d", st.Name,st.Din);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here ,I am trying to convert map values into String array but i am
I am trying to convert my BufferedImage into a integer array, but i am
I am trying to convert some xml into a json object using PHP. This
When I'm trying to convert an object into byte array I'm getting a wierd
I'm trying to convert the byteArray of a Sound Object to an array with
I am trying to convert an array of the RECT structure (given below) into
I am trying to convert following table data into nested array using PHP. I
I'm trying to convert this string : $json = '[{a:1,b:2,c:3,d:4,e:5}, {a:6,b:7,c:8,d:9,e:10}]'; To an array
Trying to convert int arrays to string arrays in numpy In [66]: a=array([0,33,4444522]) In
Hey, I am trying to convert NSString to a C string using cStringUsingEncoding but

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.