我的 sqlite 数据库中有两个表。我想根据按钮单击对表数据库进行操作。当 button1 单击时,它将插入到 pdsource 表中,在 button2 上单击时,它将插入到 pdreview 表中。
按钮 1 功能正常。但是 Button2 单击会产生问题。
我的表创建脚本是
CREATE TABLE "pdsource" ("Id" INTEGER PRIMARY KEY NOT NULL ,"AudioFileName"
TEXT,"AudioFilePath" TEXT,"TextFileName" TEXT,"TextFilePath" TEXT,"DateTime"
TEXT,"Duration" TEXT,"Attempts" TEXT)
CREATE TABLE pdreview(
reviewId INTEGER,
priid Integer,
fwords Text,
Gr Text,
dslow Text,
orating Text,
comments Text,
FOREIGN KEY(reviewId) REFERENCES pdsource(id)
)
我将在此处粘贴LogCat
错误
06-17 14:49:22.006: I/SqliteDatabaseCpp(6423): sqlite returned: error code = 1, msg = no such table: pdreview, db=/data/data/com.first.personalitydevelopment/databases/PersonalityDevelopment.db
06-17 14:49:22.042: E/SQLiteDatabase(6423): Error inserting orating=good Gr=Noun missing fwords=hmm prid=1 dslow=medium comments=Excellent
06-17 14:49:22.042: E/SQLiteDatabase(6423): android.database.sqlite.SQLiteException: no such table: pdreview: , while compiling: INSERT INTO pdreview(orating,Gr,fwords,prid,dslow,comments) VALUES (?,?,?,?,?,?)