[android-developers] Re: SQLite Query
ContentValues initialValues = new ContentValues();
initialValues.put("name", namedata);
initialValues.put("country", countrydata);
return mDb.insert(table1, null, initialValues);
On Oct 12, 12:27 am, dipti desai <diptidesa...@gmail.com> wrote:
> How to insert more than two values in the coulmn.?
> i have a table having columns name and country
> I want to insert input data into SQLitedatabase
> public void insert(String name,String country)
> {
> String[]params = new String[2];
> params[0]=name;
> params[1]=country;
> db.execSQL("INSERT INTO table1(name,country)
> VALUES(?,?)",params);
>
>
>
>
>
>
>
> }
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home