image - Android SQLite cursor null -


I am dynamically creating a PDF file using the iText library. In the PDF file I insert the picture taken from the database, but if the image is not present then the file has not been created. Is there a way around this when the cursor result is zero? This is my query:

  string sql2 = "Logo logo select from logo"; Cursor c3 = db.rawQuery (sql2, null); If (c3.moveToFirst ()) {byte [] blob = c3.getBlob (c3.getColumnIndex (LogoTable.LOGO)); Bitmap B1 = Bitmap FrontenderDesidedAbayAttray (Blob, 0, Blob.Lamp); } C3.close (); Db.close; ...  

A part of my helper class

  @Override Creating a Public Zero (SQLiteDatabase DB) {DatabaseHelper.db = db; Stringbuilder builder = new stringbiller (); // tabla logo maker = new stringbiller (); Builder.Append ("Make Table {0} ("); Builder.Append ("{1} Integrate Primary Key Entitentment"); Builder.Append ("{2} Blob"); Builder.Append (" ); "); Db.execSQL (MessageFormat.format (builder.toString (), LogTable. TABLE_NAME, logotable._id, logotable. LOGO);  


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -