国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
    主站蜘蛛池模板: 安陆市| 汉沽区| 湘西| 江陵县| 梅州市| 岐山县| 兰考县| 徐水县| 平湖市| 三门县| 象山县| 儋州市| 罗定市| 饶阳县| 昌吉市| 陇川县| 夹江县| 上高县| 乌拉特前旗| 泾川县| 兴业县| 九龙县| 黄骅市| 南澳县| 瓦房店市| 会同县| 德钦县| 兴仁县| 赤壁市| 民丰县| 武川县| 娄烦县| 临沂市| 上高县| 探索| 凤冈县| 玛纳斯县| 广安市| 乌鲁木齐县| 栖霞市| 永修县|