Error while calling a stored procedure using SQLJ

This is a discussion on Error while calling a stored procedure using SQLJ within the Oracle Errors forums in Oracle Database category; I am calling a stored procedure defined inside a package through a SQLJ script. The first parameter of that procedure is a IN OUT parameter which is used as a ROWID for creating a cursor. That ROWID value is the same for every record in the table, thereby enabling us to create a cursor. When I give a hard-coded value as a parameter, I get an error stating that the assignment is not correct as the query is expecting a variable and not a literal. Hence I removed the hard-coded value and included a dymanic value in the ...

Go Back   Database Forum > Oracle Database > Oracle Errors

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 02-07-2008, 07:49 AM
Default Error while calling a stored procedure using SQLJ

I am calling a stored procedure defined inside a package through a SQLJ script. The first parameter of that procedure is a IN OUT parameter which is used as a ROWID for creating a cursor. That ROWID value is the same for every record in the table, thereby enabling us to create a cursor.

When I give a hard-coded value as a parameter, I get an error stating that the assignment is not correct as the query is expecting a variable and not a literal. Hence I removed the hard-coded value and included a dymanic value in the SQLJ call.

String strVal = "A";
#sql{CALL ASSIGNMENTS_PKG.INSERT_ROW :{strVal},'SALARY_CODE_GROUP','BU',3,105,sysdate,1 ,sysdate,1,1)};

Here "ASSIGNMENTS_PKG" is a package name and INSERT_ROW is the procedure.

When the SQLJ program is run, I get an error stating:

"PLS-00201: identifier 'A' must be declared"

I read the error message, but I am not able to understand where I need to give the GRANT permission to.
Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 06:59 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.