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

The Archive Base Latest Questions

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

I have saved images in document directory and saved its path in data base

  • 0

I have saved images in document directory and saved its path in data base successfully now I am not getting that how to show that image in my image view?

Should I use query to select only path?

Will it automatically pick the image from directory?

Or should I use code for load image in my view where I want to show image.

-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *strimagename;
    strimagename=[NSString stringWithFormat:@"Test.jpg"];
    thumbFilePath = [documentsDirectory stringByAppendingPathComponent:strimagename];
    UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
    NSLog(@"image path: %@ ", [MyCommonFunctions saveImageInDocuments:image]); 
    imageSelect.image = image;
    [self dismissModalViewControllerAnimated:YES];
     NSLog(@"image saved %@",image);
}

This above code is for saving.


By using this code in i get this log message for image:

2012-12-08 20:40:30.450 loginApp[757:c07] CONNECTION SUCCESSFUL WITH DB 
2012-12-08 20:41:05.371 loginApp[757:c07] image path: 08412012084105.png 
2012-12-08 20:41:05.378 loginApp[757:c07] image saved <UIImage: 0x926da00> 

Success Query:

insert into login(Name,Email,Password,DOB,image) values('hamesh', 'hamesh@hamesh.com','hamesh','2012-12-09 04:40:57 +0000','<UIImageView: 0x926d8f0; frame = (139 219; 133 115); opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x926d950>>')

here i am using code that build Sql,in image should i give property NSString? or imageView?

- (IBAction)registerbtn:(id)sender {
    DBHandler *db =[[DBHandler alloc]init];

        if([self validateForm])
        {
            if([self validateEmailWithString:txtEmail.text])
            {
                if ([db authenticateRegistration:txtName.text andEmail:txtEmail.text andPassword:txtPassword.text andDob:txtDob.text andImage:imageSelect])
                {
                    UIAlertView *loginalert = [[UIAlertView alloc] initWithTitle:@"  Congrats" message:@"SignUp Success" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
                    [loginalert show];
                                }
                else
                { 
 UIAlertView *loginalert = [[UIAlertView alloc] initWithTitle:@"  Try Again!" message:@"SignUp Failure" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
                    [loginalert show];
                }
            }
        }
  • 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-15T18:34:57+00:00Added an answer on June 15, 2026 at 6:34 pm

    Looking at your updated question that includes the NSLog statements, it appears that your NSLog of [MyCommonFunctions saveImageInDocuments:image] is correct. But you also show us the SQL that you’re generating, and it is obviously not using that [MyCommonFunctions saveImageInDocuments:image] for the last parameter, but rather you’re obviously accidentally grabbing a UIImageView. Look at your code that is building that SQL. Update your question with that code that builds your SQL if the solution doesn’t leap out at you.

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

Sidebar

Related Questions

I have saved an image path in database like so: C:\Users\3embed\Documents\Visual Studio 2010\Projects\HeritageWeb\HeritageWeb\Images\startbutton.png I
I have a raw image file that is saved in binary data (no encoding).
I have a program that saves an image in a local directory and then
We have an Oracle BPM 10g activity that: Reads a form-fill protected Word document
I have a document that has two content types: text/xml and text/html. I would
I am working on an app that saves multiple images in Documents directory. These
I've asked similar questions before, but have not received a definitive answer. Seems that
I have a list based application that uses Core Data to store most information,
I have a Document Entity and I want that the user of the website
I am trying to extract images from a document saved as WordML. Some of

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.