oracle8i中的utl_tcp包的使用问题????????????(100分)

  • 主题发起人 主题发起人 dxd0222
  • 开始时间 开始时间
D

dxd0222

Unregistered / Unconfirmed
GUEST, unregistred user!
我可以如下使用:
declare
c utl_tcp.connection;
aa number;
begin
c := utl_tcp.open_connection('10.5.55.72',47110);
aa := utl_tcp.available(c);
DBMS_OUTPUT.put_line(aa);
utl_tcp.flush(c);
---utl_tcp.write_line(c,'050101',6);
utl_tcp.close_connection(c);
utl_tcp.close_all_connections;
end;
但不能如下使用:
declare
c utl_tcp.connection;
aa number;
begin
c := utl_tcp.open_connection('10.5.55.72',47110);
aa := utl_tcp.available(c);
DBMS_OUTPUT.put_line(aa);
utl_tcp.flush(c);
utl_tcp.write_line(c,'050101',6); ---是这一行,报错信息见下面!
utl_tcp.close_connection(c);
utl_tcp.close_all_connections;
end;

报错信息:
ERROR 位于第 9 行:
ORA-06550: 第 9 行, 第 5 列:
PLS-00221: 'WRITE_LINE' 不是过程或尚未定义
ORA-06550: 第 9 行, 第 5 列:
PL/SQL: Statement ignored


请同行帮助帮助!!!!!!!!!!
毛毛小虫顿首!
 
为何不到WWW.ITPUB.NET上看看,应该那儿有人可以解决你的问题
 
谢谢,我去看看!!!!!!
 
http://www.quest-pipelines.com/newsletter-v3/0302_C.htm
 
应该是Oracle的版本问题
我在ora901上试了一下,write_line过程是有的,但参数只有两个:
/**
* Writes a text line to a TCP/IP connection. The line is terminated
* with the new-line character sequence sepecified when this connection
* is opened.
*
* PARAMETERS
* c TCP/IP connection
* data the data to be written
* RETURN
* Then number of bytes written to the connection.
* EXCEPTIONS
* network_error - network error
* NOTES
* Text messages will be converted from the database character set
* to the on-the-wire character set, specified when the connection was
* opened, before they are transmitted on the wire.
*/
FUNCTION write_line(c IN OUT NOCOPY connection,
data IN VARCHAR2 DEFAULT NULL)
RETURN PLS_INTEGER;
Oracle 9i第二版也是这样。
 
多人接受答案了。
 
后退
顶部