|
试着连了下,应该可以的
Dim rs,sq
set conn=createobject("adodb.connection")
set rs=createobject("adodb.recordset")
' Oracle client is required to be installed on your box
conn.open="Driver={Microsoft ODBC for Oracle};Server=SID_HOST.DOMAIN.COM;Uid=mssqa;Pwd=password;"
sql="select * from CLIENT_TABLE"
rs.open sql,conn,3,3
'Services.StartTransaction "TIMER"
do while not rs.eof
values=rs("CLIENT_NAME")
if values<>"State Street Corporation" then
Reporter.ReportEvent 2, "ClientNameSearched:"&" "&values, ""
rs.movenext
else
Reporter.ReportEvent 0, "ClientNameFound:"&" "&values,""
exit do
end if
Loop
'Services.EndTransaction "TIMER"
rs.close
set rs=nothing
conn.close
set conn=nothing
参考资料
1. VBScrip Database Tutorial http://www.electronics.dit.ie/st ... base%20Tutorial.pdf
2. ADO介绍 http://www.51windows.net/pages/a ... scadogsoverview.htm
3. 数据库连接字符串 http://www.connectionstrings.com/
希望有用:)
[ 本帖最后由 readytofly 于 2006-7-21 13:44 编辑 ] |
|