SDey681610 (Community Member) asked a question.

What's causing a sql injection in the following code. It's a inner join query with 2 dynamic parameters.

sql="SELECT FO.UNIQUEID,FO.FLOORID,FO.NAME FROM FLOOROBJECT FO INNER JOIN DRY_LEVEL DL ON FO.PARENTID=DL.GUID_TX WHERE DL.PARENT_ID_TX=? AND UPPER(FO.TYPE)=?";

c=null;

try{

String args1[]={CachedInfo._lossId,"EQUIPMENT"};

DBHelper dh=DBInitializer.getDbHelper(); //DBHelper extends extends SQLiteOpenHelper

c=dh.getWritableDatabase().rawQuery(sql, args1);

}

catch(Exception e){}

 


Topics (2)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.