国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

使用COBOL.net訪問數(shù)據(jù)庫

2024-07-10 13:02:13
字體:
供稿:網(wǎng)友
<@ page language="cobol">
<html>
<head>
    <script runat="server" language="cobol">
       environment division.
       configuration section.
       repository.
       property datasource
       property mydatagrid
       class sqlconnection as "system.data.sqlclient.sqlconnection"
       class sqlcommand as "system.data.sqlclient.sqlcommand"
       class sqldatareader as "system.data.sqlclient.sqldatareader"    
       class sys-eventargs as "system.eventargs"
       class sys-type as "system.type".
       object.
       procedure division.
       method-id. onload as "onload" override.
       data division.
       working-storage section.
       01 mysqlconnection object reference sqlconnection.
       01 mysqlcommand object reference sqlcommand.
       01 mysqldatareader object reference sqldatareader.
       01 mytype object reference sys-type.
       01 datasource object reference icollection.
       linkage section.
       01 args object reference sys-eventargs.
        procedure division using by value args.
       invoke super "onload" using by value args.
       invoke sqlconnection "new" using by value "data source=(local); trusted_connection=yes;
                                                  initial catalog=pubs" returning mysqlconnection.
       invoke sqlcommand "new" using by value "select * from publishers" mysqlconnection
                                                                      returning mysqlcommand.
       invoke mysqlconnection "open".
       invoke mysqlcommand "executereader" returning mysqldatareader.
       set datasource of mydatagrid to mysqldatareader.
       invoke mydatagrid "databind".
          invoke mysqlconnection "close".
       end method onload.
       end object.
    </script>
</head>
<body>
<form runat="server">
<asp:datagrid id="mydatagrid" runat="server" />
</form>
</body>
</html>

  • 本文來源于網(wǎng)頁設(shè)計(jì)愛好者web開發(fā)社區(qū)http://www.html.org.cn收集整理,歡迎訪問。
  • 發(fā)表評(píng)論 共有條評(píng)論
    用戶名: 密碼:
    驗(yàn)證碼: 匿名發(fā)表
    主站蜘蛛池模板: 平泉县| 将乐县| 鲁山县| 上饶县| 普格县| 昆山市| 乐至县| 永宁县| 延安市| 登封市| 达州市| 高台县| 兴国县| 郓城县| 湛江市| 和田县| 嫩江县| 那曲县| 咸阳市| 鹰潭市| 钟祥市| 改则县| 邯郸市| 巴林右旗| 石林| 宜州市| 阳信县| 崇礼县| 新兴县| 锡林浩特市| 通辽市| 武胜县| 中卫市| 昌黎县| 秭归县| 沧源| 神农架林区| 新河县| 循化| 铜陵市| 莎车县|