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

Java Development

Reply
New Developer
Posts: 53
Registered: ‎06-07-2011
My Device: 9800 torch
My Carrier: o2

Sanitising MySQL

How do you sanatise MySQL statements on BlackBerry? The PreparedStatement isn't included in the SDK

New Developer
Posts: 53
Registered: ‎06-07-2011
My Device: 9800 torch
My Carrier: o2

Re: Sanitising MySQL

if i just enclose the data in double quotes will that be enough?
Highlighted
Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Sanitising MySQL

You have not got the Prepared Statement in BB but u can use the bind method to bind values in to a statement object.

I am using 5.0 API

 

Have a look

http://www.blackberry.com/developers/docs/5.0.0api/index.html

 

 Statement s = "SELECT * FROM T WHERE a < ? AND a > ?";
 s.prepare();
 s.bind(1, upperBound);  // an integer specifying the upper bound.
 s.bind(2, lowerBound);  // an integer specifying the lower bound.