Jump to content
JasperReports Library 7.0 is now available ×

problem passing sqlquery as parameter.


Recommended Posts

By: Johnny - v_johnny

problem passing sqlquery as parameter.

2003-07-29 00:29

Hi ..

 

 

I am giving the sql as parameter in hashmap and i am paaing to jasper but when ever i am trying to generate the report its giving the sql exception.

 

illegal sqlException as variable name/number . ora 01036 ...

 

 

But whenever i am trying to run the query in oracle promt it doen't have any problem.

 

kindly anybody can help where i am wrong..whether i am wrong in oracle or jasper.

 

But its simply a select query ...so its hould be in jasper how to solve it..

 

thanks in advance..

 

Regards

Johnny

 

 

 

 

 

 

By: David Hardwick - dhardwick

RE: problem passing sqlquery as parameter.

2003-07-29 07:16

Are you using the $P!{variable} syntax to specify the variable instead of the $P{variable} method? That way the query will just be sent to Oracle as a string and will not be precompiled and expecting binding parameters.

 

Also, check into the username/password you are using with your datasource. If you are not connecting with the proper username/password via Jasper but are via Oracle's SQL Plus then that could also explain the problem. You may need to further qualify some of the tables with schema.user.table (well, that's what you need to do in SQL Server, I don't recall the exact symantics for Oracle)

 

 

 

 

By: Johnny - v_johnny

RE: problem passing sqlquery as parameter.

2003-08-04 02:36

 

 

Hi David..

 

I solved it by using Datasource in jsp page.Thanks a lot.

 

Regards

JOhnny

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