PreparedStatement index out of range

when i am running the preparedstatement with setString(index,value), it's throwing index out of range. even though the index is correct, 1 with 1 parameter.

turns out the cause is, java is treating single quote of ? as part of the statement instead of the placeholder.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s