Hi Kostya Thanks.

On Oct 18, 3:59 pm, "pramod.deore" <deore.pramo...@gmail.com> wrote:
> Hey Evgeny Thanks for reply. But I don't get it. See i have two
> strings as String nm,add. Now I want to add these strings to my table
> which name is SAMPLE_TABLE_NAME. How to do that?
>
> On Oct 18, 3:26 pm, Evgeny V <evgen...@gmail.com> wrote:
>
> > insert into my_table_name (string_type_column_name1,
> > integer_type_column_name2) values('string_value1', 777)
>
> > On Mon, Oct 18, 2010 at 11:46 AM, pramod.deore 
> > <deore.pramo...@gmail.com>wrote:
>
> > > Hi, I had created a database and I am writing some values ino that
> > > database as.
>
> > > sampleDB.execSQL("INSERT INTO " +
> > >                                SAMPLE_TABLE_NAME +
> > >                                " Values ('s','m');");
>
> > > Then here the values are added as s and m respectively.It is fine. But
> > > now I don't want to use hard coded value like's' and 'm'. Now I have 2
> > > String as.
> > > String nm = "Pramod";
> > > String add = "deore";
>
> > > Now I want to add these 2 String to database. When I write code as
> > > sampleDB.execSQL("INSERT INTO " +
> > >                                SAMPLE_TABLE_NAME +
> > >                                " Values (nm,add');");
>
> > > Then I got error as -
> > > 10-18 15:15:14.464: ERROR/Database(21408): Failure 1 (no such column:
> > > s) on 0x2fb288 when preparing 'INSERT INTO App Values (s,m);'.
> > > 10-18 15:15:14.473: ERROR/ShowSwitches(21408): Could not create or
> > > Open the database.
>
> > > How to add String to database?
> > > Thanks
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> > > 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to