建議你用spgoal(spgoal)的方法﹐其實也不必再連一次數據庫﹐你在第一次連數據庫的時候用到connection吧﹐那么把連好的connection賦給一個application那么以后在每個頁面都可以此application作為connection而無須再連一次數據庫﹐舉例如下﹕
'連庫代碼
set conn=Server.CreateObject("ADODB.Connection")
set oConn=Server.CreateObject("ADODB.Connection")
dsn="provider=sqloledb.1;data source=172.24.7.66;initial catalog=zwpp;User ID=renshi;password=zongwu"
conn.open dsn
set application("dba_zwpp")=conn
'顯示代碼
sql_note="select column_name from table_name where id='"& str_id &"'"
set rs_note=application("dba_zwpp").execute(sql_note)
response.write rs_note("column_name")