Thursday, 15 May 2014

oracle11g - socket connection -



oracle11g - socket connection -

i send string via socket external display unit via oracle 11g database gather character or string first has converted hex , @ end of string checksum must addead (to validate string sent)

can tell me how socket connection can opened , string can sent?

thank you

declare bt_conn utl_tcp.connection; retval binary_integer; l_sequence varchar2 (50) := '@0100010303000118000201001401000201'; --string sent begin bt_conn := utl_tcp.open_connection (remote_host => '127.0.0.1', --ip of socket opened remote_port => 26665, -- port number of socket tx_timeout => 15); dbms_lock.sleep(1); -- ensure slight pause 1 time opening connection before --sending string retval := utl_tcp.write_line (bt_conn, l_sequence); utl_tcp.flush (bt_conn); utl_tcp.close_connection (bt_conn); exception when others raise_application_error (-20101, sqlerrm); utl_tcp.close_connection (bt_conn); end;

oracle11g

No comments:

Post a Comment