我这里出了什么呢,请求给位高手帮忙看一下 这是我写的java连接oracle的程序,主要是创建了一个oracle调用java类的sql语句
Class.forName("oracle.jdbc.driver.OracleDriver");
conn= DriverManager.getConnection(DBURL,"SYSTEM","SYSTEM");
Statement st=conn.createStatement();
CallableStatement proc = null;
String sql="create or replace and compile java source named li_javaDemoee as public class javaDemoee{} ";
System.out.println(sql);
st.execute(sql); 控制台报一下错误:
create or replace and compile java source named li_javaDemoee as public class javaDemoee{}
Exception in thread "main" java.sql.SQLException: 出现不支持的 SQL92 标记: 90:
但是我把打印出来的sql语句
放到sql/pl里面是可以执行成功的
SQL> create or replace and compile java source named li_javaDemoee as public class javaDemoee { };
2 / Java 已创建。
Class.forName("oracle.jdbc.driver.OracleDriver");
conn= DriverManager.getConnection(DBURL,"SYSTEM","SYSTEM");
Statement st=conn.createStatement();
CallableStatement proc = null;
String sql="create or replace and compile java source named li_javaDemoee as public class javaDemoee{} ";
System.out.println(sql);
st.execute(sql); 控制台报一下错误:
create or replace and compile java source named li_javaDemoee as public class javaDemoee{}
Exception in thread "main" java.sql.SQLException: 出现不支持的 SQL92 标记: 90:
但是我把打印出来的sql语句
放到sql/pl里面是可以执行成功的
SQL> create or replace and compile java source named li_javaDemoee as public class javaDemoee { };
2 / Java 已创建。
解决方案 »
- 如何写和选择main class当用exe4j生成exe执行档时
- 银行管理系统中的代码问题
- 【高分】【急】借宝地,问个与java不相关的问题:怎样扩展linux 的 tmp空间?谢谢!
- 请教高手,这段代码错在哪里?
- 如何获取某个double类型数据的指定精度的值
- 过滤器怎么过滤不了??
- 急求!!!关于JTable 与 JCheckBox
- 如何根据字节数来截取一个字符串的长度
- 急急求教:
- skyyoung(路人甲)先生,你好:我遇到一个难题,特向你请教,我用 qmail+vpopmail 做邮件服务器,怎样区分新旧邮件?
- 关于“实在太难看了,能不能让这段代码好看一点?需要实现相同的功能:每一条语句都要执行”的一种解决方案
- 垂直线
楼主截止到2008-06-21 00:02:27的汇总数据:
注册日期:2008-6-20
上次登录:2008-6-20
发帖数:2 发帖分:120
结贴数:0 结贴分:0
结贴率:0.00 % 结分率:0.00 %
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
如:Statement stmt = conn.createStatement();
stmt.setEscapeProcessing(false);
stmt.executeUpdate("create or replace and compile java source named li_javaDemoee as public class javaDemoee{} ");
请参考Oracle的官方说明
Disabling Escape Processing
Escape processing for SQL92 syntax is enabled by default, which results in the JDBC driver performing escape substitution before sending the SQL code to the database. If you want the driver to use regular Oracle SQL syntax, which is more efficient than SQL92 syntax and escape processing, then use this statement: stmt.setEscapeProcessing(false);