全部,
我正在开发一个使用oracle包UTL_TCP写入数据然后尝试从中读取数据的程序。我可以调用 write_text 消息,但无法使用 UTL_TCP 的 read_text、get_line 方法等进行编译。
我不熟悉oracle上UTL_TCP的安装,但它几乎就像安装或配置为只允许写入而不读取数据。
如果有人对此有任何见解,将不胜感激。
谢谢
-- Open connection to Eyecon device WORKS
v_eyecon_connection := UTL_TCP.open_connection(v_eyecon_ipaddress, v_eyecon_port);
-- Send the message WORKS
v_eyecon_bytes_written := UTL_TCP.write_text(v_eyecon_connection, v_eyecon_message);
-- Read the response from Eyecon DOES NOT COMPILE
--UTL_TCP.set_timeout(v_eyecon_connection, 10000); set timout (in ms)
--UTL_TCP.read_text(v_eyecon_connection, v_eyecon_response, 4000);
v_eyecon_response := '';
LOOP
-- Fetch each line of the response. DOES NOT COMPILE
UTL_TCP.get_line(v_eyecon_connection, v_response_line, TRUE);
v_eyecon_response := v_eyecon_response || v_response_line;
EXIT WHEN v_response_line IS NULL;
END LOOP;
UTL_TCP.GET_LINE (
c IN OUT NOCOPY connection,
remove_crlf IN BOOLEAN DEFAULT FALSE,
peek IN BOOLEAN DEFAULT FALSE)
RETURN VARCHAR2;
显然与您的电话不匹配...