我这里出了什么呢,请求给位高手帮忙看一下 这是我写的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 已创建。
解决方案 »
- 请问:编写一个登陆注册的功能,怎样把用户的登录名或注册名保存在一个XML文件中,也就是在XML中存入数据
- (int)(char)(byte)-1具体是怎么换算的?
- 各位,帮我看看问题处在哪? 100....
- 如何写一小段程序从一句sql里面解析出表名 在线等 谢谢大家了
- Class类
- 急!为什么TextArea 中没出现 JScrollPane
- 装了2个JDK,如何指定其中一个为系统默认JVM?(在线等待)
- 做海龟好还是做土鳖好?
- 点击JB中的Database组件的conection属性的时候(准备连接sql server),怎么会没有反应?
- constructor一题?????
- 关于“实在太难看了,能不能让这段代码好看一点?需要实现相同的功能:每一条语句都要执行”的一种解决方案
- 垂直线
楼主截止到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);