Thanks Guys, Using rawQuery()it works.
On Nov 11, 11:25 pm, Kumar Bibek wrote:
> It's not mandatory to use the primary key.
>
> On Thu, Nov 11, 2010 at 4:29 PM, Ravi Shankar Kumar
> wrote:
>
>
>
> > plz use primary key that is generally autoincreamented key for any
> > particular row identificat
It's not mandatory to use the primary key.
On Thu, Nov 11, 2010 at 4:29 PM, Ravi Shankar Kumar wrote:
> plz use primary key that is generally autoincreamented key for any
> particular row identification
>
>
> On Thu, Nov 11, 2010 at 4:15 PM, pramod.deore wrote:
>
>> Logcat gives me following outp
plz use primary key that is generally autoincreamented key for any
particular row identification
On Thu, Nov 11, 2010 at 4:15 PM, pramod.deore wrote:
> Logcat gives me following output
>
> 11-11 16:13:13.031: ERROR/Database(709): Failure 1 (no such column:
> BathRoom) on 0x145618 when preparing '
you should pass bathroom with apices, so 'bathroom' not bathroom.
with apices sql knows you are talking about a value not a column name.
String APICE = "'"; //the value is '
sampleDB.execSQL("SELECT RoomID FROM " +ROOM_TABLE_NAME+"where
RoomName="+ APICE + selectedRoom + APICE);
hope i understo
Indeed, you can use execSQL for statements like CREATE, UPDATE, DELETE,
INSERT. For SELECT you have to use query.
Best regards,
Filip Havlicek
2010/11/11 Daniel Drozdzewski
> On Thu, Nov 11, 2010 at 11:17 AM, pramod.deore
> wrote:
> > Hi, Daniel and Filip Thanks for reply.
> > after changing q
On Thu, Nov 11, 2010 at 11:17 AM, pramod.deore wrote:
> Hi, Daniel and Filip Thanks for reply.
> after changing query as
> sampleDB.execSQL("SELECT RoomID FROM " +ROOM_TABLE_NAME+" where
> RoomName='"+selectedRoom + "'");
>
> Now logcat gives following warning
>
> 11-11 16:44:42.298: WARN/System.e
Hi, Daniel and Filip Thanks for reply.
after changing query as
sampleDB.execSQL("SELECT RoomID FROM " +ROOM_TABLE_NAME+" where
RoomName='"+selectedRoom + "'");
Now logcat gives following warning
11-11 16:44:42.298: WARN/System.err(772):
android.database.sqlite.SQLiteException: unknown error: Quer
Hi Pramod,
since you are trying to select something based on a string where clause, you
have to encapsulate the string into '', so you have to write either
selectedRoom='BathRoom' or sampleDB.execSQL("SELECT RoomID FROM "
+ROOM_TABLE_NAME+"where
RoomName='"+selectedRoom+"'"); (= put the quotes in
Logcat gives me following output
11-11 16:13:13.031: ERROR/Database(709): Failure 1 (no such column:
BathRoom) on 0x145618 when preparing 'SELECT RoomID FROM roomtable
where RoomName=BathRoom'.
11-11 16:13:13.159: WARN/System.err(709):
android.database.sqlite.SQLiteException: no such column: BathR
9 matches
Mail list logo