The forum will be down for scheduled maintenance on Saturday, March 4 beginning at 10am EST. Actual downtime is unknown but may be several hours.

Can any one tell me how to get bitmap from ultralite database using ResultSet.getBlobInputStream?

asked 10 Feb '12, 19:51

TEJ's gravatar image

TEJ
31455
accept rate: 0%

Can you tell us what platform and API you are using? What version of UltraLite are you using?

(13 Feb '12, 09:00) PhilippeBert...

I am using Android. I have the image stored in ultralite database in form of byte array.

(13 Feb '12, 13:04) TEJ

The following code fragment gives the idea:

ResultSet rs = ps.executeQuery();
while( rs.next() ) {
    if( !rs.isNull( 3 ) ) {
        InputStream is = rs.getBlobInputStream( 3 );
        // read the column using InputStream
    }
}

Is that what you are looking for?

(17 Feb '12, 13:49) Andy Quick

The following code fragment gives the idea:

ResultSet rs = ps.executeQuery();
while( rs.next() ) {
    if( !rs.isNull( 3 ) ) {
        InputStream is = rs.getBlobInputStream( 3 );
        // read the column using InputStream
    }
}
permanent link

answered 06 Mar '12, 15:51

Andy%20Quick's gravatar image

Andy Quick
2.1k2436
accept rate: 43%

@Andy: FWIW, you can also "convert an existing comment to an answer" with the help of the leftmost button below the comment...

(07 Mar '12, 03:54) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×130

question asked: 10 Feb '12, 19:51

question was seen: 692 times

last updated: 07 Mar '12, 03:54