Jump to content
Changes to the Jaspersoft community edition download ×

preparedStatement setString quotes

Recommended Posts

By: krabat - sl940961

preparedStatement setString quotes

2002-03-06 08:05


I was wondering how i can get rid of the single quotes in the queryString.


I have :



<![CDATA[ select * from $P{table} ]]>



but this is not working because the resulting queryString is


select * from 'MyTable'


because setString put the single quotes before and after my tablename. How do I get rid of those quotes?






By: Teodor Danciu - teodord

RE: preparedStatement setString quotes

2002-03-07 04:43




Parameters in the query string are used just

as you use parameters in a PreparedStatement.


You cannot dynamically set the name of a table

using PreparedStatement parameters.


If you need such functionality, create the

ResultSet object outside JasperReports and pass

it to the JasperReports when filling your report

(using JRResultSetDataSource).







By: krabat - sl940961

RE: preparedStatement setString quotes

2002-03-07 06:37



that's exactly what i was looking for...

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...