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
963 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
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…

863 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

25 Experts available now in Live!

Get 1:1 Help Now