If you work on Eclipse try to read carefully the Console and logCat window,
maybe there you'll find the answer

Στις 22 Νοεμβρίου 2010 1:38 μ.μ., ο χρήστης pramod.deore <
[email protected]> έγραψε:

>
> Hi, ΠΑΣΧΑΛΗΣ ΠΛΙΑΧΑΣ yes it solves my problem. But I don't understand
> what earlier query not work.
>
> On Nov 22, 4:28 pm, ΠΑΣΧΑΛΗΣ ΠΛΙΑΧΑΣ <[email protected]> wrote:
> > I made this for myself and it works
> > I created a class named fro example dbFile
> > public class DbFile  {
> > static Cursor getAll(SQLiteDatabase db) {
> > return(db.rawQuery("SELECT * FROM TableName ORDER BY ColumnName",
> > null));
> >
> > }
> > }
> >
> > and from my activity class i declare
> > Cursor model=null;
> > and on create i call:
> > model=DbFile.getAll(db);
> >
> > 2010/11/22 pramod.deore <[email protected]>
> >
> > > I have still the problem. I read at
> >
> > >http://books.google.co.in/books?id=2XeNswkT_2YC&pg=PA232&lpg=PA232&dq.
> ..
> >
> > > as it write query as
> > > constantsCursor = db.rawQuery("SELECT _ID ,title,value" +
> > > "FROM constants ORDER BY title",null);
> >
> > > I also tried like above
> >
> > > Cursor c = sampleDB.rawQuery ("SELECT
> > > SwitchID,SwitchName,RoomID,RoomName"+
> > >                                "From SwitchTable ORDER BY
> RoomID",null);
> >
> > > But still not getting output.
> >
> > > On Nov 22, 9:56 am, "pramod.deore" <[email protected]> wrote:
> > > > I had also tried as
> >
> > > > Cursor c = sampleDB.query(SWITCH_TABLE_NAME, new String[]
> > > >                             {"SwitchID,SwitchName,RoomID,RoomName"},
> > > "RoomID=
> > > > ",null,null,null," ASC");
> >
> > > > But still it is not working.Any clue?
> >
> > > > On Nov 22, 9:13 am, "pramod.deore" <[email protected]> wrote:
> >
> > > > > Hi ,
> > > > > I have a table that has 4 columns.There is no primary key in that
> > > > > table. Now I want to retrieve table data according to ascending
> order
> > > > > of one column (say ascending order of RoomID). I had tried it as
> >
> > > > > Cursor c = sampleDB.query(SWITCH_TABLE_NAME, new String[]
> > > > >
> {"SwitchID,SwitchName,RoomID,RoomName"},
> > > > > "RoomID"+ " ASC" ,null, null, null, null);
> >
> > > > > But it doesn't work. Anyone know what is wrong here?
> > > > > Thanks
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]<android-developers%[email protected]>
> <android-developers%[email protected]<android-developers%[email protected]>
> >
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to