ORA-01036 Illegal Variable Name/number when calling stored procedure

I'm using Oracle 7.3.4 and am using the toraclequery to call a stored procedure. The stored procedure has 4 variables... IN_CONTRACT_ID, IN_CROP_YEAR, IN_WAREHOUSE_ID and IN_WAREHOUSE_REC_PSR. I'm calling it like this;

with sp_record_rice_inventory_cont do
begin
SetVariable('IN_CONTRACT_ID',t_contract_inventory_psr.fieldbyname('CONTRACT_ID').asstring);
SetVariable('IN_CROP_YEAR',t_contract_inventory_psr.fieldbyname('CROP_YEAR').asstring);
SetVariable('IN_WAREHOUSE_ID',t_contract_inventory_psr.fieldbyname('WAREHOUSE_ID').asstring);
SetVariable('IN_WAREHOUSE_REC_PSR',t_contract_inventory_psr.fieldbyname('WAREHOUSE_REC_PSR').asstring);
Execute;
end;

I've declared the variables in my toraclequery. This is my first time to call stored procedures with DOA. What am I doing wrong?

------------------
 
If you declare variables that are not included in the SQL text (as :variable), you will get an ORA-01036. Can you post the actual SQL text?

------------------
Marco Kalter
Allround Automations
 
Back
Top