Comments (6)
我的问题原因在于 Cursor cursor = db.query(DBConstants.TABLENAME, null, "netid=?"+netid,
null, null, null, null);
不应该将条件直接拼接
换成: Cursor cursor = db.query(DBConstants.TABLENAME, null, "netid=?",
new String[] { netNoteId }, null, null, null);
ok 完美解决!!!
from sqlcipher.
The answer from cuijianzhi actually worked for me haha, first I was trying to query my data using:
Cursor cursor = db.rawQuery("SELECT " + choice + " FROM consumption WHERE day = ?" dayTime ,null);
where dayTime (is a String) was something like "03052016". Like bigmickyg i got the error "variable number must be between ?1 and ?999". Now after creating a new String or whatever new String[] { dayTime } is doing, it finally worked 💃
Cursor cursor = db.rawQuery("SELECT " + choice + " FROM consumption WHERE day = ?",new String[] { dayTime } ,null);
from sqlcipher.
Hello Michael,
The error you are seeing is coming back from the parser, there is no inherent limitation on the primary keys size or inclusion of large numbers in queries. Most likely there is something wrong with the query you are using that is causing the large number to be interpreted as a bind parameter, see below.
https://www.sqlite.org/lang_expr.html#varparam
If you send over the exact code and query you are using we could take a look.
from sqlcipher.
Hello,
Thanks for the prompt reply.
For the moment we've worked around it by including the number directly in the query rather than in the whereArgs parameter.
We will review our query. It's very long and rather complicated - so we'll have a look first.
Regards,
Michael
from sqlcipher.
Michael,
Excellent, sounds good. I'm going to close this ticket for now, but please feel free to re-open or comment again at a later date.
Cheers,
Stephen
from sqlcipher.
Hello cuijianzhi,
I am not sure that I follow what you are saying above, please feel free to ask questions regarding SQLCipher on our mailing list, or you can create a new issue here if you are reporting a problem. Thanks!
from sqlcipher.
Related Issues (20)
- Unable to compile in Debian 12.5 (bookworm) running in Docker on RHEL7 HOT 1
- unseen char in shell.c.in HOT 1
- Loading libsqlcipher.so in a dart process segfaults. HOT 1
- documentation in sqlcipher.1 manpage contains some kind of artifact from a merge error HOT 2
- how to clear password HOT 3
- 4.5.7 release was not completed HOT 2
- Query related to sqlcipher rpm HOT 1
- pod install failed HOT 2
- Conflict Between CryptoSwift and SQLCipher in Swift Project Preventing Database Encryption HOT 3
- Usage of HMAC inside the code base
- how to use this?
- Attach older sqlcipher version FAILED HOT 1
- Build of 4.6.0 fails: `error: os/log.h: No such file or directory`; `error: ‘OS_LOG_DEFAULT’ undeclared (first use in this function)` HOT 4
- Build Failed: 'openssl.cypto.h' file not found HOT 1
- i want to restore deleted data ,how can i find the free pages HOT 1
- Memory leak HOT 3
- License declaration CocoaPods HOT 3
- Potential Memory leak in ext/recover/sqlite3recover.c HOT 1
- SQLCipher cipher_page_size changed automatically. HOT 7
- Encryption-related HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlcipher.