'在此处放置初始化页的用户代码
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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12122734/viewspace-524635/