Set Res=createobject("adodb.recordset")
Set Cmd=createobject("adodb.command")
Cmd.activeconnection="Provider=SQLOLEDB.1;Password=111111;Persist Security Info=True;User ID=sa;Initial Catalog=xhq;Data Source=192.168.191.142"
Cmd.CommandType = 1
sql="select name from company where (id=1)"
Cmd.CommandText = sql
Set res = Cmd.Execute()
msgbox res("name")
Set res = nothing
Set cmd.ActiveConnection = nothing
Set Cmd= nothing
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