Hi,
I am new in android. I am trying to build up an application. When I
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);
}
the application stopped unexpectedly showing "The application........
stopped unexpectedly. Please try again". The code to create 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.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---