[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Error Message:Not All Variables Bound.

Posted on 2000-01-11
5
Medium Priority
?
920 Views
Last Modified: 2008-03-10
Under Oracle8, using C to access the database, I can have something like the following
-----------
insert into XXX (col1)
values (decode(:jc,0,NULL,:jc ));

and bind the variable 'jc' once.

However, compiled under oracle7, when I run the program, it complains with 'Not all variables bound'.  Seems the compiler sees two 'jc's in the building of the statement but only one bind command.  One strategy may be to rename one of the variables and bind it as well, but this is very extensive throughout the program.  Is there anyway to go around this?
0
Comment
Question by:dteoh
5 Comments
 
LVL 4

Expert Comment

by:syakobson
ID: 2345626
What tool do you use to compile?

Solomon Yakobson.
0
 
LVL 1

Expert Comment

by:szetoa
ID: 2346107
Just a thought, can you bind the variable the second time.
0
 

Author Comment

by:dteoh
ID: 2347808
Sorry.  The platform is Digital unix osf1 V4.0 1091 alpha.  The compiler is DIGITAL_C++_Version_V6.1-027 with libraries Generic++ 2.1 and STLport 3.01.

Also when I try to bind jc twice, the compiler complains.
0
 

Author Comment

by:dteoh
ID: 2361633
Hi.  here are somemore updates to the problem.  Our database is one that deals with Chinese characters (double byte?).  There is an environment variable called NLS_LANG that is defaulted to AMERICAN_AMERICA.WE8DEC.  I find that when I replace it with TRADITIONAL CHINESE_TAIWAN.ZHT16DBT then it works.  Does anyone have any idea why?
0
 
LVL 3

Accepted Solution

by:
Ron Warshawsky earned 600 total points
ID: 2493714

Here what ORACLE says:

Doc ID:  Note:1004426.6
Subject:  ORA-1008 NOT ALL VARIABLES BOUND DURING RUNTIME
Type:  PROBLEM
Status:  PUBLISHED
 Content Type:  TEXT/PLAIN
Creation Date:  24-MAY-1994
Last Revision Date:  24-MAY-1994
Language:  USAENG
 
Problem Description:
====================
 
ORA-1008 "not all variables bound" during run time.
 
Problem Explanation:
====================

Solution Abstract:
==================
 
This is bug 71568. This bug is caused by referencing a bind variable at the
very last optional clause (having, group by, order by, etc.), the select is not
null terminated in this case.  
 
Workaround: Don't put the bind variable at the end.
 
Solution Diagnostics:
=====================
 
Solution Explanation:
=====================

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
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
Suggested Courses

612 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