IBM Power Systems AS/400 iSeries ¤Ë´Ø¤¹¤ë³Ð¤¨½ñ¤­¤Ê¥Ú¡¼¥¸¤Ç¤¹¡£

¥³¥Þ¥ó¥É¼Â¹Ô¡õSQL¼Â¹Ô¥â¥¸¥å¡¼¥ë

»ä¤¬Jython¤Ç¤è¤¯»È¤¦¥â¥¸¥å¡¼¥ë¤Ç¤¹¡£
PrimulaUtl01.py
from java.io import *
from java.lang  import *
from com.ibm.as400.access import *
from com.ziclix.python.sql import zxJDBC
from com.ziclix.python.sql import PyConnection

def runCom(as,c):
    commandCall = CommandCall(as)
    print c
    commandCall.run(c)
    ml = commandCall.getMessageList()
    for m in ml:
        System.out.println(m.getID() + ":" + m.getText())

def runSql(as,sql):
    try:
        datasource = AS400JDBCDataSource(as)
        connection = datasource.getConnection()
        con = PyConnection(connection)
    except zxJDBC.DatabaseError, e:
        print "¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËÀܳ¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿"
        print "¸¶°ø¡§" + e[0]
        sys.exit(1)

    cur = con.cursor()
    cur.execute(sql)
    rset = cur.fetchall()
    cur.close()
    con.close()
    return rset

¤³¤Î¥Ú¡¼¥¸¤Ø¤Î¥³¥á¥ó¥È

UVS9E1 I loved your article post.Thanks Again. Really Cool.

0
Posted by awesome things! 2014ǯ02·î05Æü(¿å) 21:21:24 ÊÖ¿®

y5aYzQ Im thankful for the article post. Awesome.

0
Posted by stunning seo guys 2014ǯ01·î22Æü(¿å) 04:12:55 ÊÖ¿®

GSJVXJ <a href="http://unzvsgsqveqj.com/">unzvsgsqveqj</a>, [url=http://gnczjdmuopvs.com/]gnczjdmuopvs[/url], [link=http://yjtgwytonxie.com/]yjtgwytonxie[/link], http://tjpyrfdwnocq.com/

0
Posted by wdctuwnzrxe 2013ǯ11·î15Æü(¶â) 07:45:52 ÊÖ¿®

¥³¥á¥ó¥È¤ò¤«¤¯


¡Öhttp://¡×¤ò´Þ¤àÅê¹Æ¤Ï¶Ø»ß¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

ÍøÍѵ¬Ìó¤ò¤´³Îǧ¤Î¤¦¤¨¤´µ­Æþ²¼¤µ¤¤

WikiÆ⸡º÷

Menu

¤³¤³¤Ï¼«Í³¤ËÊÔ½¸¤Ç¤­¤ë¥¨¥ê¥¢¤Ç¤¹¡£

¥á¥ó¥Ð¡¼¤Î¤ßÊÔ½¸¤Ç¤­¤Þ¤¹