saving Image using sql query method
<p>I am using following code: Note that i HAVE TO SEND SQL Query so using this procedure.</p>

<p><code>currentReceipt.image</code> is a <code>byte[]</code></p>

<pre><code>       String updateQuery = "INSERT INTO MAReceipts(userId, transactionId, transactionType, receiptIndex, referenceNo, image, smallThumb, comments, createdOn, updatedOn) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";

       java.util.Date today = new java.util.Date();
   long t = today.getTime();
   java.sql.Date now = new java.sql.Date(t);

   for(int i = 0; i &lt; receipts.size(); i++)
       {
        try{
       Receipt currentReceipt = receipts.get(i);
           String[] valVars = {
                    stringToDB(transaction.userId), 
                    integerToDB(transaction.transactionId),
                    integerToDB(transaction.transactionType.getValue()),
                    integerToDB(i),
                    stringToDB(currentReceipt.referenceNo),
                    (currentReceipt.image != null ? imageToDB(currentReceipt.image): "null"),
                    (currentReceipt.smallThumb != null ? imageToDB(currentReceipt.smallThumb): "null"), // NEED TO CHANGE THIS TO SMALL THUMB
                    stringToDB(currentReceipt.comments),
                    dateToDB(now),
                    dateToDB(now)
                    };

            mDb.execSQL(updateQuery, valVars); 
        }catch (Exception e){
           Log.e("Error in transaction", e.toString());
           return false;
            }
       }


public String imageToDB (byte[] image)
    {
      String convertedImage = image.toString(); 
      return convertedImage;
    }
</code></pre>

<p><code>return convertedImage</code> shows a value of <code>[B@43eb4218</code> or similar to that.</p>

<p>Now this data is saved in database. Please tell me is the image is correctly saving in database and can i retrieve it? If not then any preferable way , do tell me.</p>

<p>Best Regards</p>
