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
991 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 77

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

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

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…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

737 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