How to use single database for multiple application?

Put your problem here if it does not fit any of the other categories.

Postby preetam_pict » Wed Sep 02, 2009 6:44 am

nmc wrote:
This creates a new (or opens an existing) database on sd:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. SQLiteDatabase.openDatabase("/sdcard/demo.db3", null, SQLiteDatabase.OPEN_READWRITE + SQLiteDatabase.CREATE_IF_NECESSARY);
  2.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4

Your app doesnt need any permissions to do this.

The newly created database will be completely empty of course. so you have to create the needed tables using some 'create table if not exists' statements then.



If I am using
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. SQLiteDatabase.openOrCreateDatabase("/sdcard/demo.db3",null);
  2.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4

then cant i use SQLiteOpenHelper ???

thanks !
~pp
preetam_pict
Freshman
Freshman
 
Posts: 5
Joined: Tue Aug 25, 2009 2:52 pm
Location: India

Top

Postby preetam_pict » Wed Sep 02, 2009 8:18 am

preetam_pict
Freshman
Freshman
 
Posts: 5
Joined: Tue Aug 25, 2009 2:52 pm
Location: India

Postby Noob » Mon Oct 26, 2009 4:00 am

nmc wrote:I would create the database on sd card; there its public accessable and your problem is solved.



Thanks. However, if we dont create it in SDcard, is it possible to access the database from multiple application or multiple thread in a same application?
Noob
Freshman
Freshman
 
Posts: 5
Joined: Mon Oct 26, 2009 3:56 am

Re: How to use single database for multiple application?

Postby zehunter » Mon Feb 01, 2010 8:04 am

shishir.bobby wrote:i have three applications and i want to use a single database.
Which procedure should i follow ,to perform different actions like insert , update and delete , in a single database from different application .

Thanks in advance.

Stop using capslock for the topic!


if all application belong to you, you can look deeply in content provider, and try to create a custom one for all your application.

http://developer.android.com/intl/fr/gu ... iders.html
zehunter
Developer
Developer
 
Posts: 27
Joined: Sun Jan 10, 2010 10:45 am

Top
Previous

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 13 guests