title: How to make android spinner select from tblContacts
body: <p>I am using jdbc 1.2.8 to connect to MS SQL database, and there I have a tblContacts containing few contact names.</p>
  
  <p>What I am trying to do now it to make my spinner {select * from tblContacts} and populate the list just like a regular spinner.</p>
  
  <p>I am stuck here, I am not really sure what to do at this moment, help is appreciated, thanks.</p>
  
  <p>At this point I have this.</p>
  
  <hr>
  
  <pre><code> Spinner staticSpinner = (Spinner) findViewById(R.id.spinner);
  
  
      ArrayAdapter&lt;CharSequence&gt; staticAdapter = ArrayAdapter
              .createFromResource(this, R.array.brew_array,
                      android.R.layout.simple_spinner_item);
  
  
              .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  
  
      staticSpinner.setAdapter(staticAdapter);
  
      Spinner dynamicSpinner = (Spinner) findViewById(R.id.spinner);
  
      String[] items = new String[] { "Android", "AndroidOld", "AndroidNew" };
  
      ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,
              android.R.layout.simple_spinner_item, items);
  
      dynamicSpinner.setAdapter(adapter);
  
      dynamicSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
          @Override
          public void onItemSelected(AdapterView&lt;?&gt; parent, View view,
                                     int position, long id) {
              Log.v("item", (String) parent.getItemAtPosition(position));
          }
  
          @Override
          public void onNothingSelected(AdapterView&lt;?&gt; parent) {
              // TODO Auto-generated method stub
          }
      });
  </code></pre>