开发者

SQLite prepared statements alternative for escaping

开发者 https://www.devze.com 2023-03-02 19:47 出处:网络
I have implemented an SQLite database on a BlackBerry mobile device. My problem is that the BlackBerry API is very limited, and does not offer prepared statements.Therefore, I am unable to (easily) es

I have implemented an SQLite database on a BlackBerry mobile device. My problem is that the BlackBerry API is very limited, and does not offer prepared statements. Therefore, I am unable to (easily) escape the SQL to prevent against SQL injection. Does anyone have any alternatives? Unfortunately, REGEX is not available to me either...

Do I basically 开发者_JAVA百科need to do a replaceAll() for all special characters?

Thanks!


I am surprised at your assertion that there are no prepared statements supported for SQLite on Blackberry, given that a tiny amount of googling and link following leads me to this example which shows exactly how to do a prepared statement with positional parameters.

0

精彩评论

暂无评论...
验证码 换一张
取 消