ITPub博客

首页 > Linux操作系统 > Linux操作系统 > .net exec procedure

.net exec procedure

原创 Linux操作系统 作者:ceo_lxy 时间:2008-12-30 10:43:14 0 删除 编辑

  '在此处放置初始化页的用户代码
        Dim STRCON As String
        Dim SQLSTR As String
        Dim rs As ADODB.Recordset
        Dim rs_d As ADODB.Recordset
        Dim sql_d As String
        Dim rs_p As ADODB.Recordset
        Dim sql_p As String

        STRCON = "Provider=MSDAORA.1;SERVER=crp;DATA SOURCE=crp;USER ID =apps;PASSWORD=apps"
        'delete from table
        sql_d = "truncate table ch_bi_t1"
        rs_d = Server.CreateObject("ADODB.RecordSet")
        rs_d.Open(sql_d, STRCON, 3, 1)

        'excute procudure
        Dim cmdSql As ADODB.Command
        Dim strconU As String
        Dim conn As New ADODB.Connection
        Dim CmdSqlt As ADODB.Command
        ' strconU = "Provider=MSDAORA.1;SERVER=H80;database=PROD;data Source=PROD.WORLD;User ID=inquiry;Password=aabb"
        cmdSql = Server.CreateObject("ADODB.Command")
        conn.ConnectionString = STRCON
        conn.Open()
        cmdSql.ActiveConnection = conn
        cmdSql.CommandText = "ch_bi_p1"
        cmdSql.CommandType = 4
        'cmdSql.Parameters.Append(cmdSql.CreateParameter("p_org_id", 200, 1, 999, 255))
        'cmdSql.Parameters.Append(cmdSql.CreateParameter("P_CONC_REQUEST_ID", 200, 1, 999, 1))
        'cmdSql.Parameters.Append(cmdSql.CreateParameter("P_SUB_INV", 200, 1, 999, "产成品"))
        cmdSql.Execute()
        cmdSql.Cancel()
        conn.Close()

        'crystalreport
        SQLSTR = "select * from  ch_bi_t1 where sum_close>0 "
        rs = Server.CreateObject("ADODB.RecordSet")
        rs.Open(SQLSTR, STRCON, 3, 1)
        'Label1.Text = rs.Fields(0).Value
        Dim obj As New wip_p
        obj.SetDataSource(rs)
        CrystalReportViewer1.ReportSource = obj

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12122734/viewspace-524635/,如需转载,请注明出处,否则将追究法律责任。

上一篇: communication
下一篇: 美文背诵
请登录后发表评论 登录
全部评论

注册时间:2008-06-02

  • 博文量
    519
  • 访问量
    490323