Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: the connection reference between java and cobol

$
0
0

this is right source and tested.

-------------------------------------jvm cobol source-----------------------------------------------------------------------

method-id execute.

      local-storage section.

      linkage section.

      01 myconnection object.

      01 WK-TEST PIC X(9).

      procedure division using by value myconnection.

     *jvmcobolから呼び出してdbを接続の場合、下記ようにを書かなければならない

       exec sql bind connection myconnection to :myconnection

       end-exec.

       IF SQLCODE NOT = 0

            DISPLAY "CONNECTION ERROR"SQLCODE

       END-IF.

       EXEC SQL UNBIND CONNECTION :myconnection

       END-EXEC.

end method.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>