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

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 - Updating a Cursor/DB from PopupWindow

Updating a Cursor/DB from PopupWindow

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

Updating a Cursor/DB from PopupWindow

Postby buster » Mon Jun 02, 2008 5:04 pm

Hello there,

i have a ListActivity which creates a DB-Connection and shows the results.
When i click on an item, a PopupWindow is shown, giving me the opportunity to change the name.
Besides the fact that i am somehow unable to change the text in my EditText in the PopupWindow (hitting keys does nothing), it wont give me an error when updating the Cursor and does nothing.
My Code: (c is the Cursor and defined in the ListActivity, it points to the selected item which i can verify because the popupwindow contains text from the cursor)

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2.                 mySaveButton.setOnClickListener(new OnClickListener()
  3.  
  4.                 {
  5.  
  6.  
  7.  
  8.                         public void onClick(View arg0) {
  9.  
  10.                                 c.updateString(1, myEditText.getText().toString());
  11.  
  12.                                 //c.updateString(1, "Testmeeting "+Integer.toString(c.position()));   // <- doesnt work either
  13.  
  14.                                 c.commitUpdates();
  15.  
  16.                                 pw.dismiss();
  17.  
  18.                         }
  19.  
  20.                 }
  21.  
  22.                 );
  23.  
  24.  
Parsed in 0.011 seconds, using GeSHi 1.0.8.4


From debugging there seems to be nothing wrong. The SQLiteDatabase from which the Cursor was created still exists and is not null, as is the Cursor. Still nothing happens. :(

Does someone have a hint where i could look next? I'm a bit stuck here for a while now...

Thanks in advance, Sebastian
buster
Junior Developer
Junior Developer
 
Posts: 23
Joined: Tue Apr 22, 2008 4:14 pm
Location: Berlin, Germany

Top

Postby cadlg » Mon Jun 02, 2008 5:30 pm

Hi Sebastian.

Just in case...
Remember that ColumnPosition is zero-based, and you could be updating a field that is not the one you are verifying...

Regards,

cadlg
cadlg
Experienced Developer
Experienced Developer
 
Posts: 84
Joined: Wed Feb 20, 2008 12:33 am
Location: Guatemala

Postby buster » Tue Jun 03, 2008 9:44 am

Actually i missed a log output stating that my cursor doesnt support commitUpdate and i wasnt able to fix this, so i just used a regular query.
buster
Junior Developer
Junior Developer
 
Posts: 23
Joined: Tue Apr 22, 2008 4:14 pm
Location: Berlin, Germany

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: Exabot [Bot] and 5 guests