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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Select question from MySQL 1 20
Pivot tables in SQL 1 36
how to tune the query 17 54
Update the value of table B with value of table A tables inner join 6 76
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…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

756 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