Missing or Invalid Option [message #91019] |
Fri, 15 February 2002 23:37 |
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
|
|
|
|