Jump to content
Changes to the Jaspersoft community edition download ×

SQLExcption while passing parameter in query


ktrinad

Recommended Posts

By: Narendar - narendar_doshi

SQLExcption while passing parameter in query

2003-05-29 05:04

Hi,

 

I got the following exception while i was trying to pass parameter in the compiler.

How to solve this problem

Executing query select * from edn_custdepartment where Dept_No=$P{Dept_No}

 

java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Syntax error or access violation

 

at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)

 

at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)

 

at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3065)

 

at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338)

 

at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:253)

 

at IReportCompiler.main(IReportCompiler.java:145)

 

 

Abnormal termination!

 

thx,

narendar

 

 

 

 

By: Giulio Toffoli - gt78

RE: SQLExcption while passing parameter in query

2003-05-29 14:27

You must set a default value for your parameter (filling the fields default Parameter Expression in the parameter form) and leave blank the query field in the compiler form.

 

Giulio

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...