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 - How to delete a database

How to delete a database

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

How to delete a database

Postby fugo » Wed Nov 26, 2008 6:00 pm

How do you delete a database programatically. I know that I can go to:

/data/data/<appdir>/databases

and blow away the database file. But how can I do it in code?
fugo
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Nov 26, 2008 5:53 pm

Top

Re: How to delete a database

Postby Sparkletron » Thu Jan 01, 2009 4:21 am

Just use a file reference like you would with any other Java app...

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. File databaseDirectory = new File("/data/data/<appdir>/databases/");
  2.  
  3. File[] databaseFiles = databaseDirectory.listFiles();
  4.  
  5.  
  6.  
  7. for (File databaseFile : databaseFiles) {
  8.  
  9.      databaseFile.delete();
  10.  
  11. }
  12.  
  13.  
Parsed in 0.011 seconds, using GeSHi 1.0.8.4
Sparkletron
Developer
Developer
 
Posts: 26
Joined: Tue Nov 04, 2008 6:17 am

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 4 guests