title: Android Java Cannot showing database table and cannot resolve method 'setText(java.sql.Date)'
body: <p>I am new in android java world. Now, I'm trying to display data table from MSSQL in ArrayList to ListView in android. I'm trying to make the following code something like this in <strong>ScanResult</strong> Class;</p>
  <pre><code>public class FillList extends AsyncTask&lt;String,String,String&gt;{
      String z =&quot;&quot;;
      List&lt;Map&lt;String,String&gt;&gt; prolist = new ArrayList&lt;Map&lt;String,String&gt;&gt;();
  
      @Override
      protected void onPreExecute() {
      }
  
      @Override
      protected void onPostExecute(String s) {
          Toast t = Toast.makeText(getApplicationContext(),s,Toast.LENGTH_SHORT);
          t.show();
      }
  
      @Override
      protected String doInBackground(String... strings) {
          try{
              ConnectionHelper connectionHelper = new ConnectionHelper();
              connect = connectionHelper.connectionclass();
              if(connect==null){
                  z =&quot;Connection error&quot;;
              } else {
                  String query =  &quot;SELECT LabelNo &quot; +
                                      &quot;,  Qty     &quot; +
                                      &quot;,  Rmrks   &quot; +
                                      &quot;,  ScanDate   &quot; +
                                  &quot;FROM  dbo.shikakarikensa &quot; +
                                  &quot;WHERE CAST(ScanDate AS DATE) = CAST(GETDATE()-1 AS DATE) &quot; +
                                  &quot;AND Type = 'I' &quot; +
                                  &quot;ORDER BY ScanDate DESC&quot;;
                  PreparedStatement ps = connect.prepareStatement(query);
                  ResultSet rs = ps.executeQuery();
                  while (rs.next()){
                      CustomListViewValueArr.add(new ScanModel(rs.getString(&quot;LabelNo&quot;),rs.getInt(&quot;Qty&quot;),rs.getString(&quot;Rmrks&quot;),rs.getString(&quot;ScanDate&quot;)));
                  }
                  z=&quot;Today's scan result list&quot;;
              }
          } catch (Exception ex){
              z = ex.getMessage();
          }
          return z;
      }
  }
  </code></pre>
  <p>But I get an error <strong>Cannot resolve method 'setText(java.sql.Date)'</strong> in the <strong>CustomAdapter</strong> Class, which is in the line;</p>
  <blockquote>
  <p>holder.txtscandate.setText(scanModel.getScanDate());</p>
  </blockquote>
  <pre><code>scanModel = null;
  scanModel=(ScanModel) mList.get(position);
  holder.txtlabelno.setText(scanModel.getLabelNo());
  holder.txtqty.setText(scanModel.getQty());
  holder.txtrmrks.setText(scanModel.getRmrks());
  holder.txtscandate.setText(scanModel.getScanDate());
  </code></pre>
  <p>I tried also comment the ScanDate line but the data does not showing in the ListView.
  This is Model Class</p>
  <pre><code>public class ScanModel {
  String LabelNo, Rmrks;
  int Qty;
  Date ScanDate;
  
  public ScanModel(String labelno, int qty, String rmrks, Date scandate) {
      LabelNo = labelno;
      Qty = qty;
      Rmrks = rmrks;
      ScanDate = scandate;
  }
  public String getLabelNo() { return LabelNo; }
  public int getQty() { return Qty; }
  public String getRmrks() { return Rmrks; }
  public Date getScanDate() { return ScanDate; }
  </code></pre>
  <p>}</p>