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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:31:56+00:00 2026-06-15T04:31:56+00:00

I have two images in a table. Now I have to store both of

  • 0

I have two images in a table. Now I have to store both of them in SQLite as blobs. but I am struggling to find a way to get it in scenario of two URLs. If it is one I can solve it. Can any one suggest me how to resolve this issue?

The code I am trying is:

private void callInsertion(String bid, String bbookId,String bname, String image1, String image2, String bdesc) throws IOException {
// TODO Auto-generated method stub

     DefaultHttpClient mHttpClient = new DefaultHttpClient();
     HttpGet mHttpGet1 = new HttpGet(image1);
     HttpGet mHttpGet2 = new HttpGet(image2);
     HttpResponse mHttpResponse = mHttpClient.execute(mHttpGet1,mHttpGet2);

     if (mHttpResponse.getStatusLine().getStatusCode() == HttpStatus.SC_OK) 
     {
         HttpEntity entity = mHttpResponse.getEntity();
         if ( entity != null) 
         {
             insertData(bid,bbookId,bname,EntityUtils.toByteArray(entity),EntityUtils.toByteArray(entity),bdesc);
         }
     }
}

But I am getting errors at client execution.

  • 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-15T04:31:58+00:00Added an answer on June 15, 2026 at 4:31 am

    Try to get like this!!

             private void callInsertion(String bid, String bbookId,String bname, String image1, String image2, String bdesc) throws IOException {
                // TODO Auto-generated method stub
    
            byte[] FirstImage = null;
            byte[] SecondImage = null;
            DefaultHttpClient mHttpClient1 = new DefaultHttpClient();
            DefaultHttpClient mHttpClient2 = new DefaultHttpClient();
            HttpGet mHttpGet1 = new HttpGet(image1);
            HttpGet mHttpGet2 = new HttpGet(image2);
            HttpResponse mHttpResponse1 = mHttpClient1.execute(mHttpGet1);
            HttpResponse mHttpResponse2 = mHttpClient2.execute(mHttpGet2);
            Log.i("calling112221","______________");
            if (mHttpResponse1.getStatusLine().getStatusCode() == HttpStatus.SC_OK) 
            {
                   HttpEntity entity1 = mHttpResponse1.getEntity();
                   FirstImage = EntityUtils.toByteArray(entity1);
                   Log.i("calling11111111","______________");
            }
            if (mHttpResponse2.getStatusLine().getStatusCode() == HttpStatus.SC_OK) 
            {
                    HttpEntity entity2 = mHttpResponse2.getEntity();
                    SecondImage = EntityUtils.toByteArray(entity2);
                    Log.i("calling","______________");
            }
    
                        insertData(bid,bbookId,bname,FirstImage,SecondImage,bdesc);
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables, content and images (and a ContentImages table for the one
Basically I have a database with two tables, that is, Updates table and Images
I have two images, both taken at the same time from the same detector.
I have two entity classes, Student and Committee. I can not post images, but
In my app i have two view controllers and have table view in both.Both
I have two tables, images and image_data and here is an example of my
If we have two tables, say; users, and images, how do we select users
I have a table which has two text boxes and an image beside it
I have two images on a WPF window that are on top of each
I have two images which i would like to compare and do different operations

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.