做个global文件好使
Sub Application_OnStart()
'==Visual InterDev Generated - startspan==
'--Project Data Connection
Application("sql_conn") = "DRIVER={SQL Server};DSN=;SERVER=zxh-obv5chssexf;DATABASE=aspdata;UID=sa;PWD=wdl;"
Application("count")=0
End Sub
文件中如下
Set conn = Server.Createobject("ADODB.connection")
Set rs = Server.CreateObject("ADODB.Recordset")
conn.Open Application("sql_conn")
sql = "select top 1000 * From t_data order by c_time desc"