Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
hungcotac
Posts: 77
Registered: ‎01-05-2013
My Device: BB10
My Carrier: Viettel

Cannot Query a String have a slash (/) in DataSource with SQLite

I have a DataSource like that: "song.db"

But when I set a query have slash (/) character like

SELECT * FROM song_table WHERE album = "abc/xyz"

 

. The DataSource cannot be load. Any one give me a solution? thanks so much

Please use plain text.
Developer
YamilBracho
Posts: 713
Registered: ‎05-31-2010
My Device: 8520
My Carrier: Movistar

Re: Cannot Query a String have a slash (/) in DataSource with SQLite

Maybe you need to "escape " the char, so 

SELECT * FROM song_table WHERE album = "abc
\
/xyz"
Please use plain text.
Developer
hungcotac
Posts: 77
Registered: ‎01-05-2013
My Device: BB10
My Carrier: Viettel

Re: Cannot Query a String have a slash (/) in DataSource with SQLite

thankyou for reply but it does't work. And in general language we don't need to escape the slash only backslash must be escape :-ss

Please use plain text.
Developer
YamilBracho
Posts: 713
Registered: ‎05-31-2010
My Device: 8520
My Carrier: Movistar

Re: Cannot Query a String have a slash (/) in DataSource with SQLite

I use the query in a sqlite cliente (sqliteman) and works fine so the problem could be with qml...

Please use plain text.
Developer
hungcotac
Posts: 77
Registered: ‎01-05-2013
My Device: BB10
My Carrier: Viettel

Re: Cannot Query a String have a slash (/) in DataSource with SQLite

Yes It is. I dont know what cascades do with the query before load the data? :-ss
Please use plain text.
Developer
YamilBracho
Posts: 713
Registered: ‎05-31-2010
My Device: 8520
My Carrier: Movistar

Re: Cannot Query a String have a slash (/) in DataSource with SQLite

Try changing the "/" to %2F so try with

SELECT * FROM song_table WHERE album = "abc%2Fxyz"
Please use plain text.
Developer
hungcotac
Posts: 77
Registered: ‎01-05-2013
My Device: BB10
My Carrier: Viettel

Re: Cannot Query a String have a slash (/) in DataSource with SQLite

still doesn't work :smileysad:. I think it's a bug of DataSource.

Please use plain text.