On Dec 2, 8:11 am, Rahul <[EMAIL PROTECTED]> wrote:
> i want to insert data in the database of Android Application i create
> this code
>
>         String Iname=EtName.getText().toString();
>         String Imob=EtMob.getText().toString();
>         String Icity=EtCity.getText().toString();
>
>                         String strsql="INSERT TABLE 
> DataTable(Name,Mobile,City) VALUES ("+
> Iname +","+ Imob +","+ Icity +")";

INSERT INTO table_name
VALUES (value1, value2, value3,...)

http://www.w3schools.com/SQL/sql_insert.asp

>              DB.execSQL(strsql);
>
> but it shows following error
>
> 12-02 16:37:59.460: ERROR/Database(370): Failure 21 (out of memory) on
> 0x0 when preparing 'INSERT TABLE DataTable(Name,Mobile,City) VALUES
> (sad,732,asd)'.
> 12-02 16:38:00.481: ERROR/Exception on query:-(370):
> android.database.sqlite.SQLiteException: unknown error: INSERT TABLE
> DataTable(Name,Mobile,City) VALUES (sad,732,asd)
> i dont undestand this error
> so plz any one help me .
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to