Binding data to Stored Procedure variables
Hi Pav - thanks for the response it was most helpful.
The below stored procedure compiles successfully...
Create Procedure Inserthelpdesk
IS
Employeeid Number;
Description varchar2(50);
Begin
Insert
Into Helpdesk (employeeid, Description)
Values (Employeeid, Description)
;
End Inserthelpdesk;
However... I want to bind data to those variables that I am passing in from an ASP.Net Web application. I assume you bind data to variables using the colon (: ) symbol - see below...
Create Procedure Inserthelpdesk
IS
:Employeeid Number;
:Description varchar2(50);
Begin
Insert
Into Helpdesk (employeeid, Description)
Values (:Employeeid, :Description)
;
End Inserthelpdesk;
However when I do this and try to compile the stored procedure I get the following error message:
Line # = 2 Column # = 1 Error Text = PLS-00049: bad bind variable 'EMPLOYEEID'
Line # = 2 Column # = 1 Error Text = PLS-00103: Encountered the symbol "" when expecting one of the following: begin function package pragma procedure subtype type use form current cursor external language The symbol "pragma was inserted before "" to continue.
Am I using the correct bind symbol and in correct way?