小编van*_*ita的帖子

如果查询没有返回任何记录,结果集的值是多少?

public ResultObject takePrefixGroupId(ArrayList prefixGroupName) 
{
 debugLog(MODULE_NAME, "Inside the takePrefixGroupId() of LCRConfigurationSessionBean");
 ResultObject resultObject = new ResultObject(LCRResponseCode.LCR_CONFIGURE_SEARCH_ERROR_EJB, null);

 String strSelectQuery = null;
 String strMessage=null;
 ResultSet resSet = null;
 Collection colInValideRecord =new ArrayList();
 Collection colErrorMessage=new ArrayList();
 Collection colValidRecord = new ArrayList();
 Collection colDataValidation=null;
 try{
  for(int i=0;i<prefixGroupName.size();i++)
  {
   strSelectQuery = "select DESTINATIONGROUPID from TBLMDESTINATIONGROUP where NAME='"+prefixGroupName.get(i)+"'";
   debugLog(MODULE_NAME, "Query::::::"+strSelectQuery);   
   resultObject = execute(strSelectQuery);
   if(resultObject.getResponseCode() == LCRResponseCode.SUCCESS_RESPONSE_CODE)
   {
    resSet = (ResultSet)resultObject.getResponseObject();
    debugLog(MODULE_NAME, "resSet::::::"+resSet);
    if(resSet != null)
    {
     while(resSet.next())
     {
      colValidRecord.add(resSet.getString("DESTINATIONGROUPID"));
     }
    }
    else
    {
     strMessage=LCRResponseCode.errorCodeToMessage(LCRResponseCode.PREFIX_GROUP_DOES_NOT_EXIST_ERROR);
     debugLog(MODULE_NAME,"MESSAGE::: …
Run Code Online (Sandbox Code Playgroud)

java

-1
推荐指数
1
解决办法
8073
查看次数

标签 统计

java ×1