by suresh kanna » Wed, 17 Dec 2008 02:34:43 GMT

Sponsored Links

i'm doing one project in android...i'm crateing one database...the have
three fields....the fields are id,title,url....i'm stored in url is String
format....but i want website URL the same time i get the url
value in database...............please help me



by hazlema » Sun, 15 Mar 2009 13:12:27 GMT

 I have a problem and I have no idea whats wrong.  I have a database
called items and it consists of the following fields: "_id integer,
list integer, category integer, item text".

In my program I have a function called getItems:

    public Cursor getItems()
        return db.query("items", new String[] {"item"}, null, null,
null, null, null);

Then I have the fillItems function in another class

    private void fillItems()
        Cursor c = db.getItems();

        String[] from = new String[] { "item" };
        int[] to = new int[] { };

        SimpleCursorAdapter cItems = new SimpleCursorAdapter(this,
R.layout.item, c, from, to);

And this fails!

I then created a debugging routine:

    private void fillItems()
        Cursor c = db.getItems();
        String s = c.getString(0);
        Toast.makeText(this, s.toString(), Toast.LENGTH_SHORT).show();

I am at a complete loss, any attempt to read any data fails, but yet a
call to c.count returns the right number of records from the database.


Sponsored Links


by jiramot » Fri, 26 Jun 2009 00:55:24 GMT

 How can i copy my database from res/raw to database path

I try

InputStram in = getResources().openRawResource(R.raw.mydata);
OutputStram out = new FileOutputStram("/data/data/mypackage/databases/

byte[] buff = new byte[1];
int len;
while( (len = > 0){

but i got an IOException with no message
I fond some reason about binary and unicode file but i don't know
about it

How can i do




by Tanay M. Kapoor » Sun, 08 Aug 2010 23:59:48 GMT

 i need to add a large amount of data to an android database i have
created. Is there any tool i can use to do this instead of making an
activity to write and manually add the data. My application need only
display the data not add new thigns to the datdbase.
Please help...



by DanH » Mon, 09 Aug 2010 02:45:44 GMT

 You can build the database on any platform (perhaps using a tool like
SQLite Expert) and upload it to Android.  The trick is that you have
get it from wherever you upload it into the app's database directory
(plus add a few extra records that Android wants).  Some info here: 



by skink » Mon, 09 Aug 2010 12:22:19 GMT


yes, sqlite is cross-platform db so you can populate it on any host

the easiest is to use sqlite3 tool




by andi rofik » Fri, 28 Jan 2011 00:40:59 GMT

 mau tanya ne..gmn cara bikin database apa eclipse dan cara ngelink


Other Threads

1. Poll: Application Upgrade Policies

I'd like to poll the community of developers about your thought on upgrades
for free applications, as we have to make this decision at SlideME as well.
Good idea? Bad? Would you like to see time-based (x number of days for
upgrades), version based (major upgrades, not free; but minor ones free)? Or
is the current Android Market way of handling okay for you?



2. Supporting more than one sensor device.

I've been looking through the cupcake sensor framework code.  It's
puzzling me that certain parts of the code look like they are designed
to support multiple devices, in the sense of having multiple control
device file descriptors, but other parts of the code give no means of
accessing things this way.

In sensors.h, function pointers open_data_source and so on are set to
take a pointer to struct sensors_control_device_t.  The original
module open passes in a handle to that pointer type, so obviously one
could set up an array of devices.  It would be nice to then pass a
particular device when, say, changing the sensor event delay.  But in
all the SensorService and SensorManager code, I see no way to use any
parameter besides the base sSensorDevice pointers (which aren't
globally accessible).

So, if I have two devices I need to open (say, /dev/foo and /dev/bar),
am I just supposed to track file descriptors for them internally?
What's the point of passing back a fd at all then?  Seems so close to
be nice and general, but not quite.  Am I missing the point somewhere?

Thanks much,


3. how to get selected indexof a listview (urgent plz)

4. how to get the current matrix mode

5. In Android can appl send laocation data as MMS or sms?

6. Persistent Sockets on ADP 1.1 (was Jetty Comet Library)

7. touch screen configuration