f



java.sql.SQLException: ORA-01036: illegal variable name/number

Hi,

I have a simple java classes trying to call a function in a database.
Below is the function signature.

function search_pipe_out
	(p_matching_ids        in   varchar2
	,p_return_pipe         in   varchar2
	,p_errorcode           in   varchar2
	)return number
	is
// implementation start here....

My Java Program

public class Test {

	public static void main(String[] args) {
		CallableStatement csmt = null;
				Connection con = null;
		csmt = null;
		try{
			Class.forName("oracle.jdbc.driver.OracleDriver");
			System.out.println("oracle.jdbc.driver.OracleDriver was loaded
successfully");
			con = DriverManager.getConnection("jdbc:oracle:oci8:@ORAWTCP","zzndn07","atlantis");
			System.out.println(con.toString());
			csmt =con.prepareCall( " { call ? := BU00153P.search_pipe_out ( ?,
?, ? ) }");
			csmt.registerOutParameter(1, Types.NUMERIC);
			csmt.setString(2,"24598520,47162288,47162289");
			csmt.setString(3, "BIP1PIPE$00400F450001");
			csmt.setString(4,"0");
			System.out.println(csmt.toString());
			csmt.execute();
			System.out.println("Done.");
			csmt.close();
			con.close();
		}catch(Exception e) {e.printStackTrace();}
	}
}



I get these error at the execute statement.


java.sql.SQLException: ORA-01036: illegal variable name/number

	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
	at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321)
	at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAccess.java:1679)
	at oracle.jdbc.oci8.OCIDBAccess.parseExecuteFetch(OCIDBAccess.java:1902)
	at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
	at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
	at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
	at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
	at Test.main(Test.java:33) 


Any help is much appreciated. 
Thanks in advance.

-Avi
0
b_avinash
2/20/2004 12:31:10 PM
comp.database.oracle 721 articles. 0 followers. Post Follow

0 Replies
664 Views

Similar Articles

[PageSpeed] 24

Reply:

Similar Artilces:

Error python + cx_Oracle :Oracle-Error-Message: ORA-01036: illegal variable name/number
Hi, i need help with the next error: "ERR_PYTHON:Oracle-Error-Message: ORA-01036: illegal variable=20 name/number", i used the cx_Oracle module, and the error not is only=20 Oracle Error. The error its for that python don't translate the query, with the=20 variables ":VARIABLE" when the VARIABLE is a number, this is th ecause=20 of Oracle error. The template is: updateQUERYBSCS var. The code : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= ...

ORA-01036: illegal variable name/number
Sir, Please any one can help me about this error.I have gone through internet but i couldn't get solution for this error.Actually i am calling a sql procedure in c++ and i am getting this error.I am not able to rectify this error from past three days pls any one can help me abt this.I am embedding procedure like this. ProcReturnType DBProc_Receive_validate_boxid_duplication(char* box) { ProcReturnType ProcReturn; boolean retStatus = FALSE; char p_msg[120]; ProcReturn.Status = FALSE; char localRet[120]; GlbOracleErrorFlag = FALSE; { struct sqlexd sqlstm; sqlst...

ORA-01036: illegal variable name/number #2
I'm trying to call a package/procedure in oracle (from an ASP page) which requires a number of parameters. I have got this working using OO40 but unfortunately the transaction rollback function doesnt seem to do much. So I'm now trying to use ADO instead (in the hope that ADO transactions will work), however I'm getting the above error. My initial searches havent turned up any suitable suggestions - there appear to be many reasons why this error might occur - none of which I have found so far fit my situation. Can anyone suggest where I am going wrong? Better still, can anyo...

SQL ERROR while executing the code java.sql.SQLException: ORA-01008: not all variables bound
Hi all i'm getting the above error plz tell me how to solve that error the code snippet is as bellow while(rst.next()){ con1=DriverManager.getConnection(url2,"rcxdev1","rcxdev1"); PreparedStatement pstmt=null; pstmt=con1.prepareStatement(sb.toString()); for(int i=0;i<mp.size();i++){ if((mp.get(rst.getMetaData().getColumnLabel(i+1)).equals("NUMBER"))) { pstmt.setInt(i+1,rst.getInt(i+1)); System.out.println("number "+i+" "+rst.getInt(i+1)); } if((mp.get(rst...

java.sql.SQLException: ORA-01034: ORACLE not available
Hi! As you'll notice I'm new to oracel :) I set up 9i r2 on a linux machine but the attempt to connect to a database (java, jdbc) ends up with the following: java.sql.SQLException: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux Error: 2: No such file or directory at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289) at oracle.jdbc.ttc7.O3log.receive1st(O3log.java:407) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:259) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) at com.onseven.dbvis.wrapper.DriverManagerImpl.getConnection(DriverManagerImpl.java:40) at com.onseven.dbvis.sql.Database.doConnect(Unknown Source) at com.onseven.dbvis.sql.Database.access$000(Unknown Source) at com.onseven.dbvis.sql.Database$ConnectionCommand.execute(Unknown Source) at se.pureit.util.ThreadCommand.runExecute(Unknown Source) at se.pureit.util.ThreadCommand.run(Unknown Source) at java.lang.Thread.run(Thread.java:534) ...

java.sql.SQLException: ORA-01006: bind variable does not exist
ps = conn.prepareStatement(" UPDATE USF_HEA_BENEFIT_AMOUNTS SET " + " BENEFIT_1_2_AMT = ?, " + " BENEFIT_3_5_AMT = ?, " + " BENEFIT_6_PLUS_AMT = ?, " + " CREATED_BY = '?' " + " WHERE " + " HEA_BENEFIT_CATEGORY_CDE = '?' AND " + ...

java.sql.SQLException: ORA-00020: maximum number of processes (100) exceeded
Hello Friends, I am getting the following error. java.sql.SQLException: ORA-00020: maximum number of processes (100) exceeded I am closing all my resultsets and all my connections in the try block. should i close ResultSets and Connections in the catch block aswell?. or the problem is due to the connection pool settings in weblogic or on the oracle side instead of in my application. Thanks in Advance s You need to close at least your Connection object in the finally clause, like this: Connection conn = null; try { //get connection... //do stuff... } catch (SQLException sqle) { e.printStackTrace(); } finally { try { conn.close(); } catch (Exception e) { //do nothing } } If your application hits the database a lot, you might want to have your DBA increase the maximum number of processes (I'm not a DBA, so I don't know how to do this, or what side-effects it might have). -Nathan sumithradevi@hotmail.com wrote in message news:<2eee46ec.0310291902.4ee0527@posting.google.com>... > Hello Friends, > > I am getting the following error. > java.sql.SQLException: ORA-00020: maximum number of processes (100) > exceeded > > I am closing all my resultsets and all my connections in the try > block. > should i close ResultSets and Connections in the catch block aswell?. > > or the problem is due to the connection pool settings in weblogic or > on the oracle...

java.sql.SQLException: java.sql.Time
I get the following error message... java.sql.SQLException: Value '00:00:00 can not be represented as java.sql.Time >From the following SQL call... SELECT COUNT(pageurl) AS PageCount, pageurl, MAX(datetime) AS LastAccess, SUM(VisitLength) as TotalVisitLength, VisitLength, RecordNum, SUM(CASE WHEN VisitLength IS NULL THEN 1 ELSE 0 END) AS NullVisits FROM clubvisits WHERE groupid = #clubid# GROUP BY pageurl ORDER BY #OrderKey# I am using ColdFusion 7 on MySQL 4.1.12a. I'm not a Java programmer - I don't know any Java, but ColdFusion acts essentially as a script la...

java.sql.SQLException: java.sql.Time
I get the following error message... java.sql.SQLException: Value '00:00:00 can not be represented as java.sql.Time >From the following SQL call... SELECT COUNT(pageurl) AS PageCount, pageurl, MAX(datetime) AS LastAccess, SUM(VisitLength) as TotalVisitLength, VisitLength, RecordNum, SUM(CASE WHEN VisitLength IS NULL THEN 1 ELSE 0 END) AS NullVisits FROM clubvisits WHERE groupid = #clubid# GROUP BY pageurl ORDER BY #OrderKey# I am using ColdFusion 7 (not my choice - don't laugh) on MySQL 4.1.12a. The error refers to the "VisitLength" field which is a "time" da...

i have a BIG database, the variable names are in the left column Now i would like to crate one new variable using information from the variable names
i have a BIG database, the variable names are in the left column Now i would like to crate one new variable: FOR arararara>10 AND arararara<83 EX. If arararara=73 that variable should be the sum of SINSJO73 and SINSJO73M For arararara 83-99 or arararara 00-09 there are four variables to calculate EX. If arararara=94 that variable should be the sum of SINSJO94 SOCB94 SINSJO94M SOCB94M Please! arararara 73 94 SINSJO73 35664 28931 SINSJO74 41259 32379 SINSJO75 51368 37279 SINSJO76 59752 41826 SINSJO77 66719 47526 SINSJO78 62300 52600 SINSJO79 64400 57500 ...

java.sql.SQLException:ORA-00904
Hi All, I am getting below error while executing my query in java program however when I run the same query on Toad/ sqlplus the query runs fine resulting the desired results. java.sql.SQLException: ORA-00904: : invalid identifier at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114) at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208) at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542) at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1333) at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:617) at oracle.jdbc.driver.Oracle...

Database and java.sql.SQLException Questions
Hello everyone!! I am back for some more much need advice and assistance! I am creating a database for the first time. I am changing some programs I recently wrote to work with this database that have to do with Salesmen. I am getting the below error when I compile CreateDatabase.java. In that I am creating the database SalesDatabase and then creating 5 tables (Users, SType, Salesman, Sales, Product). The first thing I do is create those tables and then insert informtion into the SType table and Product table. SType is the SalesType of a salesman, meaning Entry, Junior or Senior ...

java.sql.SQLException: Could not open database table
Hello NG, with Informix I get the error java.sql.SQLException: Could not open database table in my servlet after 253 or 254 selects/updates. Any idea how to solve this Problem. Its Informix SE and its not a Problem from the jdbc driver.... Chris You can find the text behind any error message by typing finderr <msgno> at the command prompt. The ones you're getting come out as: -253 Identifier length exceeds the maximum allowed by this version of the server. A name in the statement exceeds the maximum length. In 7.x, 8.x, and 9.1x versions of the databa...

java.sql.SQLException: Protocol violation on Oracle
Hi! I am using the Squirrel SQL application to connect to an Oracle instance from my local PC using the thin driver. The problem I have is that at one moment when running the application I get the following exception (from the trace): 71503 [Thread-1] ERROR net.sourceforge.squirrel_sql.client.session.SchemaInfo - failed to load stroed procedures java.sql.SQLException: Protocol violation at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160) at...

Illegal characters in database names, table names, user names...
I'm developing a simple proof-of-concept Web application, more as a personal programming exercise than anything else, that presents the user with a login form where they can type in a database name, username, and password. I then present them with a text field to type in SQL queries, and hand back a nicely-formatted HTML table with the result of their queries. Basically, just a programming exercise to get my feet wet with the Web application framework I'm using (a Python-based framework called Quixote). As I was writing the database-connection code, I got to thinking about security. How do I prevent the user from entering something like "eviluser ; drop database template1" in the username field? One way to go about it, I thought, would be to examine the dbname, username, and/or password fields and make sure that they contain only legal characters. But I couldn't find a reference in the PostgreSQL documentation to tell me which characters are considered legal or illegal in database names, usernames, or table names. And what about passwords? There may be all sorts of punctuation in there. Is there a list of illegal characters somewhere? What other methods would you recommend to validate user input before I send it off to PostgreSQL? -- Robin Munn rmunn@pobox.com ...

java.sql.SQLException: ORA-00905: missing keyword
while executing via Ant following statement CREATE TABLE "ODDO_Securities" ( "C_ID" NUMBER NOT NULL, "SYSTEM_ID" NUMBER NOT NULL, "SUBBRANCH_CODE" NUMBER NOT NULL, "OPER_ID" NUMBER, "CC_CODE" NUMBER NOT NULL, "PRICE" DOUBLE, "NOMINAL" NUMBER NOT NULL, "ID_TYPE" NUMBER, "EMITENT_CODE" NUMBER(9), "PACK_CODE" NUMBER(9), "BRAND" VARCHAR2, "LIGATURA_MASS" NUMBER, "CHEMICAL_MASS" NUMBER, "HALLMAR...

java.sql.SQLException: ORA-00904: invalid identifier
Hi, I'm using Java 1.5 with WebLogic 9.2.2 connected to an Oracle 10 db. I'm getting the below error but what is odd is that I can run the offending SQL statement fine using PL/SQL Developer. I have verified that the connection information is the same. Any way to tell exactly what is the "Invalid identifier"? Thanks, - Dave java.sql.SQLException: ORA-00904: "NPS_LOG"."PKG_NPSLOG"."GET_LKUP": invalid identifier at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:211) at weblogic.rmi.internal.BasicR...

Intermittent java.sql.SQLException: ORA-00902: invalid datatype
Hi, We are getting java.sql.SQLException: ORA-00902: invalid datatype exception intermittently while saving the data in db using java, most of the times it is working for the same data elements, We are using Oracle SQL types to save the data in Oracle9i database! Please give some suggestions why we are getting this exception only in some times -? On Feb 12, 12:24=A0am, Suresh <eluri.sur...@gmail.com> wrote: > Hi, > > We are getting java.sql.SQLException: ORA-00902: invalid datatype > exception intermittently while saving the data in db using java, most > of the times i...

I installed Oracle 11g in my home PC. I am trying to open the Oracle SQL developer. It's asking for Java.exe file. (Enter the full pathname for java.exe ) What I need to do? Please advice.
Hi, I am new to Oracle. I installed Oracle 11g in my home PC. I am trying to open the Oracle SQL developer. It's asking for Java.exe file. (Enter the full pathname for java.exe ) What I need to do? Please advice. Thanks, DK On 12 June, 01:15, DK <kumardtha...@gmail.com> wrote: > Hi, > > I am new to Oracle. I installed Oracle 11g in my home PC. I am trying > to open the Oracle SQL developer. It's asking for Java.exe file. > (Enter the full pathname for java.exe ) > What I need to do? Please advice. > > Thanks, > DK Do you have the Java Development Ki...

US-TX-Plano: DATABASE ADMIN., ORACLE, Java/SQL coding, BI/DW app.; 6M+ (45356033072)
US-TX-Plano: DATABASE ADMIN., ORACLE, Java/SQL coding, BI/DW app.; 6M+ (45356033072) ==================================================================================== Position: DATABASE ADMIN. Reference: ZYD00171 Location: Plano TX Duration: 6M+ Skills: ORACLE Java/SQL coding Experience with BI or DW applications Scope: Maintain Java source and SQL code. Maintain Install Anywhere source code. Oracle App DBA work for Prod, ModOffice and Lab database instances. Some Oracle SysDBA ...

US-TX-Plano: DATABASE ADMIN., ORACLE, Java/SQL coding, BI/DW app.; 6M+ (45356350470)
US-TX-Plano: DATABASE ADMIN., ORACLE, Java/SQL coding, BI/DW app.; 6M+ (45356350470) ==================================================================================== Position: DATABASE ADMIN. Reference: ZYD00171 Location: Plano TX Duration: 6M+ Skills: ORACLE Java/SQL coding Experience with BI or DW applications Scope: Maintain Java source and SQL code. Maintain Install Anywhere source code. Oracle App DBA work for Prod, ModOffice and Lab database instances. Some Oracle SysDBA ...

US-TX-Plano: DATABASE ADMIN., ORACLE, Java/SQL coding, BI/DW app.; 6M+ (45356358793)
US-TX-Plano: DATABASE ADMIN., ORACLE, Java/SQL coding, BI/DW app.; 6M+ (45356358793) ==================================================================================== Position: DATABASE ADMIN. Reference: ZYD00171 Location: Plano TX Duration: 6M+ Skills: ORACLE Java/SQL coding Experience with BI or DW applications Scope: Maintain Java source and SQL code. Maintain Install Anywhere source code. Oracle App DBA work for Prod, ModOffice and Lab database instances. Some Oracle SysDBA ...

US-TX-Plano: DATABASE ADMIN., ORACLE, Java/SQL coding, BI/DW app.; 6M+ (45356033072)
US-TX-Plano: DATABASE ADMIN., ORACLE, Java/SQL coding, BI/DW app.; 6M+ (45356033072) ==================================================================================== Position: DATABASE ADMIN. Reference: ZYD00171 Location: Plano TX Duration: 6M+ Skills: ORACLE Java/SQL coding Experience with BI or DW applications Scope: Maintain Java source and SQL code. Maintain Install Anywhere source code. Oracle App DBA work for Prod, ModOffice and Lab database instances. Some Oracle SysDBA ...

US-TX-Plano: DATABASE ADMIN., ORACLE, Java/SQL coding, BI/DW app.; 6M+ (45356033072)
US-TX-Plano: DATABASE ADMIN., ORACLE, Java/SQL coding, BI/DW app.; 6M+ (45356033072) ==================================================================================== Position: DATABASE ADMIN. Reference: ZYD00171 Location: Plano TX Duration: 6M+ Skills: ORACLE Java/SQL coding Experience with BI or DW applications Scope: Maintain Java source and SQL code. Maintain Install Anywhere source code. Oracle App DBA work for Prod, ModOffice and Lab database instances. Some Oracle SysDBA ...

Web resources about - java.sql.SQLException: ORA-01036: illegal variable name/number - comp.database.oracle

Resources last updated: 2/25/2016 11:36:58 PM