Home » Developer & Programmer » JDeveloper, Java & XML » Missing or Invalid Option
Missing or Invalid Option [message #91019] Fri, 15 February 2002 23:37 Go to next message
shankari
Messages: 2
Registered: February 2002
Junior Member
Hi,
If I want to set a escape character(say ) in SQL prompt, I do write following way:
set escape ;
Now If want to execute same statement using java's JDBC on a particular connection,I run following piece of code:
-----------------------------------------------
LINE 1: Class.forName("oracle.jdbc.driver.OracleDriver");

LINE 2: Connection con = DriverManager.getConnection(connectionUrl,usrnm,pswd);

LINE 3: String str = "set escape \";

LINE 4: con.createStatement().execute(str);
----------------------------------------------

LINE 1, 2 and 3 get executed fine. But at LINE 4 I get following error: "ORA-00922: missing or invalid option"

Could you please help me to resolve this problem.Or if you have any other idea about how to set escape character through java program , please tell that also.

Thanks,
shankari
Re: Missing or Invalid Option [message #91021 is a reply to message #91019] Mon, 18 February 2002 23:54 Go to previous message
Prasad
Messages: 104
Registered: October 2000
Senior Member
You are calling SQL Plus Command. It is not possible.
Previous Topic: Re: javax.servlet.ServletException: The Network Adapter could not establish the connection
Next Topic: Re: JTextPane Query
Goto Forum:
  


Current Time: Thu Mar 28 13:20:35 CDT 2024