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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can't Access My Database 57 67
sql help 8 55
SQL Server 2012 r2 - Make Temp Table Query Faster 5 44
TSQL query to generate xml 4 35
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
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.  …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

777 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