Hi,

I am new in android. I am developing an application. When my
application reached the following function:

 public void createUser(String fName, String lName, String eMail,
String userName, String passWord)
    {

        sql="INSERT INTO "+ USER_TABLE +
        " (username ,password ,firstname ,lastname, email, phone)"
        + " VALUES ('"+userName+"', '"+passWord+"', '"+fName+"',
'"+lName+"', '"+eMail+"', '8617820');";

        myDB.execSQL(sql);
    }

then the process unexpectedly stopped. My code for creating data table
is,

sql= "CREATE TABLE IF NOT EXISTS "
                        + USER_TABLE
                        + "(`id` integer primary key autoincrement,"
                        + "`username` varchar(20) NOT NULL,"
                        + "`password` varchar(40) NOT NULL,"
                        + "`firstname` varchar(50) default NULL,"
                        + "`lastname` varchar(50) default NULL,"
                        + "`email` varchar(40) NOT NULL,"
                        + "`phone` varchar(100) default NULL"
                        + ");";

        myDB.execSQL(sql);

Please help me to overcome this problem.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to