问题描述
大家好
什么时候将数据插入到数据库中没有任何数据插入数据库并且没有任何类型的错误显示....
如何解决这个错误???
log cat out put ...
10-10 15 :06:15.907:E / SQLiteDatabase(3279):插入ename = amj emobileno = 65 eid = 6 eemail = knjfd eadd = awi
10-10 15:06:15.907:E / SQLiteDatabase( 3279):android.database.sqlite.SQLiteException:nearcreate:语法错误:,编译时:INSERT INTO创建表empl_detail(eid INTEGER,ename TEXT,eadd TEXT,eemail TEXT,emobileno INTEGER);(ename,emobileno, eid,eemail,eadd)VALUES(?,?,?,?,?)
10-10 15:06:15.907:E / SQLiteDatabase(3279):at android.database.sqlite.SQLiteCompiledSql .native_compile(原生方法)
10-10 15:06:15.907:E / SQLiteDatabase(3279):在android.database.sqlite.SQLiteCompiledSql。< init>(SQLiteCompiledSql.java:64)
10-10 15:06:15.907:E / SQLiteDatabase(3279):在android.data base.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:143)
10-10 15:06:15.907:E / SQLiteDatabase(3279):at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram .java:361)
10-10 15:06:15.907:E / SQLiteDatabase(3279):在android.database.sqlite.SQLiteStatement.acquireAndLock(SQLiteStatement.java:260)
10-10 15:06:15.907:E / SQLiteDatabase(3279):在android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:112)
10-10 15: 06:15.907:E / SQLiteDatabase(3279):在android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1718)
10-10 15:06:15.907:E / SQLiteDatabase(3279) ):在android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1591)
10-10 15:06:15.907:E / SQLiteDatabase(3279):at com.example.dbdemo。 Database.insert(Database.java:87)
10-10 15:06:15.907:E / SQLiteDatabase(3279):at com.example.dbdemo.Insert_data $ 1.onClick(Insert_data.java: 41)
10-10 15:06:15.907:E / SQLiteDatabase(3279):在android.view.View.performClick(View.java:3480)
10-10 15:06:15.907: E / SQLiteDatabase(3279):在android.view.View $ PerformClick.run(View.java:13983)
10-10 15:06:15.907:E / SQLiteDatabase(3279):at android .os.Handler.handleCallback(Handler.java:605)
10-10 15:06:15.907:E / SQLiteDatabase(3279):在android.os.Handler.dispatchMessage(Handler.java: 92)
10-10 15:06:15.907:E / SQLiteDatabase(3279):在android.os.Looper.loop(Looper.java:137)
10 -10 15:06:15.907:E / SQLiteDatabase(3279):在android.app.ActivityThread.main(ActivityThread.java:4340)
10-10 15:06:15.907:E / SQLiteDatabase (3279):at java.lang.reflect.Method.invokeNative(Native Method)
10-10 15:06:15.907:E / SQLiteDatabase(3279):at java.lang.reflect.Method .invoke(Method.java:511)
10-10 15:06:15.907:E / SQLiteDatabase(3279):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit。 java的:784)
10-10 15:06:15.907:E / SQLiteDatabase(3279):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-10 15:06:15.907:E / SQLiteDatabase(3279):at dalvik.system.NativeStart.main(Native Method)
hi everyone
when ever insert a data in to data base no any data insert in data base and no any kind of error display ....
how to solve this error ???
log cat out put is...
10-10 15:06:15.907: E/SQLiteDatabase(3279): Error inserting ename=amj emobileno=65 eid=6 eemail=knjfd eadd=awi
10-10 15:06:15.907: E/SQLiteDatabase(3279): android.database.sqlite.SQLiteException: near "create": syntax error: , while compiling: INSERT INTO create table empl_detail(eid INTEGER, ename TEXT, eadd TEXT, eemail TEXT, emobileno INTEGER);(ename,emobileno,eid,eemail,eadd) VALUES (?,?,?,?,?)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:64)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:143)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:361)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.database.sqlite.SQLiteStatement.acquireAndLock(SQLiteStatement.java:260)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:112)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1718)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1591)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at com.example.dbdemo.Database.insert(Database.java:87)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at com.example.dbdemo.Insert_data$1.onClick(Insert_data.java:41)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.view.View.performClick(View.java:3480)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.view.View$PerformClick.run(View.java:13983)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.os.Handler.handleCallback(Handler.java:605)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.os.Handler.dispatchMessage(Handler.java:92)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.os.Looper.loop(Looper.java:137)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at android.app.ActivityThread.main(ActivityThread.java:4340)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at java.lang.reflect.Method.invokeNative(Native Method)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at java.lang.reflect.Method.invoke(Method.java:511)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-10 15:06:15.907: E/SQLiteDatabase(3279): at dalvik.system.NativeStart.main(Native Method)
推荐答案
这篇关于什么时候在数据库中插入数据没有任何错误,没有任何数据插入数据库......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!