Giter Site home page Giter Site logo

Comments (2)

zhw634631 avatar zhw634631 commented on May 31, 2024

我使用demo下载测试,也会报相同的sql异常
(1) no such column: id
java.sql.SQLException: queryForLong from database failed: SELECT COUNT() FROM downloadentry WHERE id = ?
at com.j256.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22)
at com.j256.ormlite.android.AndroidDatabaseConnection.queryForLong(AndroidDatabaseConnection.java:242)
at com.j256.ormlite.stmt.StatementExecutor.ifExists(StatementExecutor.java:603)
at com.j256.ormlite.dao.BaseDaoImpl.idExists(BaseDaoImpl.java:807)
at com.j256.ormlite.dao.BaseDaoImpl.createOrUpdate(BaseDaoImpl.java:335)
at com.xwdz.download.core.DownloadDBManager.newOrUpdate(DownloadDBManager.java:57)
at com.xwdz.download.core.DataChanger.postNotifyStatus(DataChanger.java:59)
at com.xwdz.download.core.DownloaderHandler$1.handleMessage(DownloaderHandler.java:67)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7710)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: android.database.sqlite.SQLiteException: no such column: id (code 1 SQLITE_ERROR): , while compiling: SELECT COUNT(
) FROM
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:986)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:593)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:590)
at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:61)
at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1469)
at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1397)
at com.j256.ormlite.android.AndroidDatabaseConnection.queryForLong(AndroidDatabaseConnection.java:231)

from quietdownload.

zhw634631 avatar zhw634631 commented on May 31, 2024

已解决:id不能加"/"否则就会出这个问题

from quietdownload.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.