You may forget Double Quote

String strsql="INSERT TABLE DataTable(Name,Mobile,City) VALUES (\""+
Iname +"\",\""+ Imob +"\",\""+ Icity +"\")";

On Dec 2, 6:11 pm, 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 +")";
>              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 [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