ORA-03115: unsupported network datatype or representation
2012-08-16 09:37
483 查看
测试实例如下:
SQL> CREATE OR REPLACE FUNCTION factorial
2 ( n BINARY_DOUBLE ) RETURN BINARY_DOUBLE IS
3 BEGIN
4 IF n <= 1 THEN
5 RETURN 1;
6 ELSE
7 RETURN n * factorial(n - 1);
8 END IF;
9 END factorial;
10 /
函数已创建。
SQL> select factorial(4) from dual;
select factorial(4) from dual
*
ERROR 位于第 1 行:
ORA-03115: unsupported network datatype or representation
修改函数数据类型:
SQL> CREATE OR REPLACE FUNCTION factorial
2 ( n number ) RETURN number IS
3 BEGIN
4 IF n <= 1 THEN
5 RETURN 1;
6 ELSE
7 RETURN n * factorial(n - 1);
8 END IF;
9 END factorial;
10 /
函数已创建。
SQL> select factorial(4.0) from dual;
FACTORIAL(4.0)
--------------
24
SQL> select factorial(4) from dual;
FACTORIAL(4)
------------
24
居然没有报错了,跟数据类型有关?
SQL> CREATE OR REPLACE FUNCTION factorial
2 ( n BINARY_DOUBLE ) RETURN BINARY_DOUBLE IS
3 BEGIN
4 IF n <= 1 THEN
5 RETURN 1;
6 ELSE
7 RETURN n * factorial(n - 1);
8 END IF;
9 END factorial;
10 /
函数已创建。
SQL> select factorial(4) from dual;
select factorial(4) from dual
*
ERROR 位于第 1 行:
ORA-03115: unsupported network datatype or representation
修改函数数据类型:
SQL> CREATE OR REPLACE FUNCTION factorial
2 ( n number ) RETURN number IS
3 BEGIN
4 IF n <= 1 THEN
5 RETURN 1;
6 ELSE
7 RETURN n * factorial(n - 1);
8 END IF;
9 END factorial;
10 /
函数已创建。
SQL> select factorial(4.0) from dual;
FACTORIAL(4.0)
--------------
24
SQL> select factorial(4) from dual;
FACTORIAL(4)
------------
24
居然没有报错了,跟数据类型有关?
相关文章推荐
- ORA-03115: unsupported network datatype or representation error
- 出现ORA-03115:unsupported network datatype or representation错误的解决方法
- An exception of type System.Data.SqlClient.SqlException was thrown. Additional exception information: A network-related or instance-specific error occ
- Oracle exp EXP-00008 和ORA-01455: converting column overflows integer datatype 的解决方法
- ORA-12705: Cannot access NLS data files or invalid environment specified 错误
- ORA-01439: column to be modified must be empty to change datatype
- ORA-12705: Cannot access NLS data files or invalid environment specified 错误
- Thread: alter varchar2 column to clob // ORA-22858: invalid alteration of datatype
- OpenCV Error::: bad flag(parameter or structure field)(Unrecognized or unsupported array type)
- W/ResourceType( 4896): Bad XML block: header size 215 or total size 0 is larger than data size 0
- System.Data - System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the r
- the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is
- ORA-12705: Cannot access NLS data files or invalid environment specified
- ORA-12705: Cannot access NLS data files or invalid environment specified
- VMWare ESXi 提示 “Failed to open disk scsi0:0: Unsupported and/or invalid disk type 7”
- ORA-01439: column to be modified must be empty to change datatype
- AutoMapper:Missing type map configuration or unsupported mapping
- [oracle][免安装Oracle客户端] ORA-12705: Cannot access NLS data files or invalid environment specified 错误
- ORA-00997: illegal use of LONG datatype
- ORA-12705: Cannot access NLS data files or invalid environment specified 错误