Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - display arrayof items from database(sqlserver) in spinner?

display arrayof items from database(sqlserver) in spinner?

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

display arrayof items from database(sqlserver) in spinner?

Postby deepu » Mon Feb 01, 2010 6:29 am

How to display particular array of items from a database (SQLServer) in a Spinner of Android?
deepu
Freshman
Freshman
 
Posts: 6
Joined: Mon Feb 01, 2010 6:03 am
Location: hyd

Top

Postby jayaram » Mon Feb 01, 2010 12:22 pm

Hi Deepu,
This is Jayaram. For loading a spinner with values in DB, first bring them into an Array.
Then for an array of Strings, use the following code.
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item, array);        
  2.  
  3. spinner1.setAdapter(adapter);
Parsed in 0.010 seconds, using GeSHi 1.0.8.4

That's it. BTW, sqlserver seems weird for Android.
jayaram
Junior Developer
Junior Developer
 
Posts: 16
Joined: Wed Jul 29, 2009 3:37 am
Location: India

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 4 guests