Re: [sqlite] querying with BLOB in WHERE clause, possible?

2014-11-15 Thread Stephan Beal
On Fri, Nov 14, 2014 at 3:57 PM, bjdodo wrote: > I've got it now. E.g. for delete you can do this: > A minor fix: the 'try' needs to be moved to... > > int argidx = 0; > SQLiteStatement statement = mDB.compileStatement(sql); > here. Because... >

Re: [sqlite] querying with BLOB in WHERE clause, possible?

2014-11-15 Thread bjdodo
I've got it now. E.g. for delete you can do this: String sql = "DELETE FROM " + table + (!TextUtils.isEmpty(whereClause) ? " WHERE " + whereClause : ""); int argidx = 0; SQLiteStatement statement = mDB.compileStatement(sql); if (whereArgs != null)

Re: [sqlite] querying with BLOB in WHERE clause, possible?

2014-11-14 Thread Clemens Ladisch
bjdodo wrote: > Sorry for resurrecting an old thread. I got the where clause working for > queries with byte array arguments based on this discussion. I cannot find > the way to use byte arrays in where clauses for update and delete > statements. In the Android database API, execSQL() is the only

Re: [sqlite] querying with BLOB in WHERE clause, possible?

2014-11-14 Thread Kees Nuyt
On Fri, 14 Nov 2014 04:59:58 -0700 (MST), bjdodo wrote: >Hi > >Sorry for resurrecting an old thread. I got the where clause working for >queries with byte array arguments based on this discussion. I cannot find >the way to use byte arrays in where clauses for update and

Re: [sqlite] querying with BLOB in WHERE clause, possible?

2014-11-14 Thread bjdodo
Hi Sorry for resurrecting an old thread. I got the where clause working for queries with byte array arguments based on this discussion. I cannot find the way to use byte arrays in where clauses for update and delete statements. I know it is terrible to use byte arrays as query arguments, I need

Re: [sqlite] querying with BLOB in WHERE clause, possible?

2011-12-18 Thread Andreas Schildbach
On 12/17/2011 09:02 PM, Igor Tandetnik wrote: Using the Android API, I'd like to do something like SELECT * from my_table WHERE my_blob=? My problem is, all of the query methods only take strings as a parameter for the '?' placeholder. How am I supposed to pass in a byte

Re: [sqlite] querying with BLOB in WHERE clause, possible?

2011-12-17 Thread Igor Tandetnik
Andreas Schildbach wrote: > On 12/17/2011 04:10 PM, Igor Tandetnik wrote: > >>> Using the Android API, I'd like to do something like SELECT * from >>> my_table WHERE my_blob=? >>> >>> My problem is, all of the query methods only take strings as a parameter >>> for the '?'

Re: [sqlite] querying with BLOB in WHERE clause, possible?

2011-12-17 Thread Andreas Schildbach
On 12/17/2011 04:10 PM, Igor Tandetnik wrote: >> Using the Android API, I'd like to do something like SELECT * from >> my_table WHERE my_blob=? >> >> My problem is, all of the query methods only take strings as a parameter >> for the '?' placeholder. How am I supposed to pass in a byte array? >

Re: [sqlite] querying with BLOB in WHERE clause, possible?

2011-12-17 Thread Igor Tandetnik
Andreas Schildbach wrote: > Using the Android API, I'd like to do something like SELECT * from > my_table WHERE my_blob=? > > My problem is, all of the query methods only take strings as a parameter > for the '?' placeholder. How am I supposed to pass in a byte array?

[sqlite] querying with BLOB in WHERE clause, possible?

2011-12-17 Thread Andreas Schildbach
Using the Android API, I'd like to do something like SELECT * from my_table WHERE my_blob=? My problem is, all of the query methods only take strings as a parameter for the '?' placeholder. How am I supposed to pass in a byte array? I already checked for a convert/cast function so I could use