I have run a oracle procedure with dynamic query and bind variables with execute immediate and using statements. It is working in some places and not working in some other places.

My query is

text := 'Select FirstName from Emploee where deptcode = :AC'
Execute immediate text using 'AC'

Here 'AC' is the deptcode. For several places like this query working fine.
Some other places are not working,
it gives the error "invalid host/bind variable name"

regds
Sakthivel