Solved

ORA-01036 Cause: Unable to find bind context on user side; Action: Make sure that the variable being bound is in the sql statement.

Posted on 2011-03-11
5
954 Views
Last Modified: 2012-05-11
Hi Experts,

Could you please help me to find the following error?

illegal variable name/number

Cause: Unable to find bind context on user side

Action: Make sure that the variable being bound is in the sql statement.

Thanks
Dil.
0
Comment
Question by:dileepav
  • 3
5 Comments
 
LVL 3

Accepted Solution

by:
LFLFM earned 375 total points
ID: 35108063
find the colon ":" in your code and replace with the value that you want... I'm guessing you copied SQL from some programming code and pasted in a SQL program?
or post more information, such as how you are sending your SQL to the database...
0
 
LVL 3

Assisted Solution

by:LFLFM
LFLFM earned 375 total points
ID: 35108070
Just to make it more clear, say you have this SQL:
SELECT * FROM mytable WHERE mykey = :1
That ":1" is a bind and must either be bound or replaced for a value...
0
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 125 total points
ID: 35108096
Can you post the code in question?
0
 
LVL 3

Assisted Solution

by:LFLFM
LFLFM earned 375 total points
ID: 35108105
Sorry just realized that your problem is actually the contrary; you are binding more than you are using...
post some of your code..  <----
What you have done is, for example, bound 3 values, but used only 2, example:
:1 = 'test'
:2 = 'myvar'
:3 = 'oracle'
and your SELECT is:
SELECT * FROM mytable WHERE field1 = :1 and field2 = :2 and field3 = 'oracle'
when it should be:
SELECT * FROM mytable WHERE field1 = :1 AND field2 = :2 AND field3 = :3
or remove the extra bind...
0
 

Author Closing Comment

by:dileepav
ID: 35219821
Thx
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now